sodabase 0.1.9 → 0.1.10

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/README.md CHANGED
@@ -22,13 +22,29 @@ node dist/cli.js # run the built CLI
22
22
  npm run dev # node --experimental-strip-types src/cli.tsx
23
23
  ```
24
24
 
25
+ ## Install just the MCP
26
+
27
+ ```bash
28
+ npx sodabase install-mcp # checkbox list, agents found locally pre-ticked
29
+ npx sodabase install-mcp -a cursor -a codex # or --agent cursor,codex / --all
30
+ npx sodabase install-mcp --no-skill # MCP only, skip the trust-advisor skill
31
+ npx sodabase install-mcp --no-input # no list: install for the agents found (CI/scripts)
32
+ ```
33
+
34
+ Without `--agent`, a terminal run shows a checkbox list with the agents found on this
35
+ machine pre-ticked (Claude Code if none); a piped run installs for those directly. Skips the wizard and sign-in (the agent signs in on its first MCP call) and runs the same
36
+ `add-mcp` + `skills add` installs as the hub's "Install MCP" step. Exits 1 only if the MCP
37
+ install fails; a skill failure warns with a manual fallback.
38
+
25
39
  Point at a local backend with `SODABASE_API_URL=http://localhost:8080`.
26
40
 
27
41
  ## Layout
28
42
 
29
43
  ```
30
44
  src/
31
- cli.tsx entry — renders <App/>
45
+ cli.tsx entry — renders <App/> (or runs the install-mcp subcommand)
46
+ installMcp.ts `install-mcp`: arg parsing, agent detection, plain-output install
47
+ agentPicker.tsx `install-mcp`'s inline agent checkbox list
32
48
  app.tsx the Ink app (flow orchestrator + screens)
33
49
  api/
34
50
  client.ts HTTP client for the real endpoints (device grant, onboarding
@@ -0,0 +1,58 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ // The agent checkbox list: the state + keys (useAgentChecklist) and the rows (AgentChecklist) are shared by the
3
+ // wizard's MCP step (ui.tsx) and `npx sodabase install-mcp`, which renders it inline (no fullscreen) via
4
+ // pickAgents. Agents found on this machine start ticked and are marked "found"; ones that already have the MCP
5
+ // are marked "already set up" and start unticked.
6
+ import { Box, Text, render, useApp, useInput } from "ink";
7
+ import { useState } from "react";
8
+ import { MCP_AGENTS } from "./installMcp.js";
9
+ /** Which agents are ticked + the cursor, and the ↑↓/space handling. `handleKey` returns true if it used the key. */
10
+ export function useAgentChecklist(preselected) {
11
+ const [sel, setSel] = useState(() => MCP_AGENTS.map((a) => preselected.includes(a)));
12
+ const [cursor, setCursor] = useState(0);
13
+ const handleKey = (input, key) => {
14
+ if (key.upArrow)
15
+ setCursor((c) => Math.max(0, c - 1));
16
+ else if (key.downArrow)
17
+ setCursor((c) => Math.min(MCP_AGENTS.length - 1, c + 1));
18
+ else if (input === " ")
19
+ setSel((s) => s.map((v, i) => (i === cursor ? !v : v)));
20
+ else
21
+ return false;
22
+ return true;
23
+ };
24
+ return { sel, cursor, handleKey, picked: () => MCP_AGENTS.filter((_, i) => sel[i]) };
25
+ }
26
+ export function AgentChecklist({ sel, cursor, found, installed }) {
27
+ return (_jsx(Box, { flexDirection: "column", children: MCP_AGENTS.map((a, i) => {
28
+ const on = sel[i];
29
+ return (_jsxs(Text, { color: on ? "green" : undefined, dimColor: !on, children: [i === cursor ? "❯ " : " ", on ? "[x]" : "[ ]", " ", a, installed.includes(a) ? (_jsx(Text, { color: "green", children: " \u00B7 already set up" })) : (found.includes(a) && _jsx(Text, { dimColor: true, children: " \u00B7 found" }))] }, a));
30
+ }) }));
31
+ }
32
+ function AgentPicker({ preselected, found, installed, skill, onDone }) {
33
+ const { exit } = useApp();
34
+ const list = useAgentChecklist(preselected);
35
+ const finish = (agents) => {
36
+ onDone(agents);
37
+ exit();
38
+ };
39
+ useInput((input, key) => {
40
+ if (list.handleKey(input, key))
41
+ return;
42
+ if (key.return)
43
+ finish(list.picked());
44
+ else if (key.escape || input === "q" || (key.ctrl && input === "c"))
45
+ finish(null);
46
+ });
47
+ return (_jsxs(Box, { flexDirection: "column", marginY: 1, children: [_jsxs(Text, { children: ["Install the Sodabase MCP", skill ? " + trust-advisor skill" : "", " for:"] }), _jsx(Box, { marginTop: 1, children: _jsx(AgentChecklist, { sel: list.sel, cursor: list.cursor, found: found, installed: installed }) }), installed.length > 0 && (_jsx(Box, { marginTop: 1, children: _jsx(Text, { dimColor: true, children: "Already set up agents stay as they are unless you tick them (reinstalls)." }) })), _jsx(Box, { marginTop: 1, children: _jsx(Text, { dimColor: true, children: "\u2191\u2193 move \u00B7 space toggle \u00B7 enter install \u00B7 esc cancel" }) })] }));
48
+ }
49
+ /** Show the checkbox list; resolves to the ticked agents, or null if the user cancelled. */
50
+ export async function pickAgents(preselected, found, installed, skill) {
51
+ let picked = null;
52
+ // exitOnCtrlC off: ctrl+c is handled above as a cancel, so we still print a clean "nothing installed".
53
+ const app = render(_jsx(AgentPicker, { preselected: preselected, found: found, installed: installed, skill: skill, onDone: (a) => (picked = a) }), {
54
+ exitOnCtrlC: false,
55
+ });
56
+ await app.waitUntilExit();
57
+ return picked;
58
+ }
@@ -7,7 +7,8 @@ import { existsSync, readFileSync } from "node:fs";
7
7
  import { join } from "node:path";
8
8
  import { emailOtpStart, emailOtpVerify, loopbackSignIn, resolveGoTrueConfig } from "./gotrueAuth.js";
9
9
  import { ApiError, } from "./types.js";
10
- export const MCP_URL = "https://sodabase.io/mcp";
10
+ /** The MCP endpoint on the same origin the client talks to, so a dev install (SODABASE_API_URL) points at the dev MCP. */
11
+ export const MCP_URL = `${(process.env.SODABASE_API_URL ?? "https://sodabase.io").replace(/\/$/, "")}/mcp`;
11
12
  /** The trust-advisor skill repo, resolved by the `skills` CLI (owner/repo on its default branch). */
12
13
  export const SKILL_REF = "sodabase/agent-skills";
13
14
  /** An error thrown when `connect()`'s poll is aborted (the user left the connect screen). */
package/dist/cli.js CHANGED
@@ -7,15 +7,64 @@ import { homedir } from "node:os";
7
7
  import { join } from "node:path";
8
8
  import { SodabaseClient } from "./api/client.js";
9
9
  import { FakeClient } from "./api/fakeClient.js";
10
+ import { pickAgents } from "./agentPicker.js";
10
11
  import { App } from "./app.js";
11
12
  import { clearCreds, loadCreds } from "./config/tokenStore.js";
13
+ import { INSTALL_MCP_HELP, detectAgents, installedAgents, parseInstallMcpArgs, resolveAgents, runInstallMcp, } from "./installMcp.js";
12
14
  const argv = process.argv.slice(2);
13
15
  const args = new Set(argv);
16
+ /** process.exit() drops output still queued on a pipe (async on macOS, e.g. `| tee log`): await this first. */
17
+ async function drained() {
18
+ await Promise.all([process.stdout, process.stderr].map((s) => new Promise((done) => s.write("", done))));
19
+ }
20
+ // `install-mcp`: a one-shot, non-interactive install of the MCP + skill — no wizard, no sign-in.
21
+ if (argv[0] === "install-mcp") {
22
+ const opts = parseInstallMcpArgs(argv.slice(1));
23
+ if ("error" in opts) {
24
+ process.stderr.write(`sodabase install-mcp: ${opts.error}\n\n${INSTALL_MCP_HELP}`);
25
+ await drained();
26
+ process.exit(2);
27
+ }
28
+ if (opts.help) {
29
+ process.stdout.write(INSTALL_MCP_HELP);
30
+ await drained();
31
+ process.exit(0);
32
+ }
33
+ const found = detectAgents();
34
+ // With --agent, only those agents' configs matter (for the "refreshed" label) — don't read the others.
35
+ const installed = installedAgents(undefined, opts.skill, undefined, undefined, opts.agents.length ? opts.agents : undefined);
36
+ let target = resolveAgents(opts.agents, found, installed);
37
+ // No --agent in a terminal: always let the user choose, starting from what we found. Piped/CI runs
38
+ // (or --no-input) skip the list and install for the detected agents that don't have it yet. Both ends
39
+ // must be a TTY: with stdout piped (`| tee log`) the list would render invisibly and look like a hang.
40
+ if (!opts.agents.length && opts.input && process.stdin.isTTY && process.stdout.isTTY) {
41
+ const picked = await pickAgents(target.agents, found, installed, opts.skill);
42
+ if (!picked?.length) {
43
+ process.stdout.write("Nothing installed.\n");
44
+ await drained();
45
+ process.exit(0);
46
+ }
47
+ target = { agents: picked, detected: false };
48
+ }
49
+ if (!target.agents.length) {
50
+ // Only reachable from auto-target: every detected agent is already set up.
51
+ process.stdout.write(`Already set up for ${installed.join(", ")}. Nothing to do.\n`);
52
+ await drained();
53
+ process.exit(0);
54
+ }
55
+ const code = await runInstallMcp(new SodabaseClient(), { ...opts, ...target, installed }, (line) => process.stdout.write(`${line}\n`));
56
+ await drained();
57
+ process.exit(code);
58
+ }
14
59
  if (args.has("--help") || args.has("-h")) {
15
60
  process.stdout.write([
16
61
  "sodabase — data-quality onboarding wizard",
17
62
  "",
18
63
  "Usage: npx sodabase [options]",
64
+ " npx sodabase install-mcp [-a, --agent <id>] [--all] [--no-skill] [--no-input]",
65
+ "",
66
+ "Commands:",
67
+ " install-mcp install the MCP + trust-advisor skill for your coding agent, then exit",
19
68
  "",
20
69
  "Options:",
21
70
  " --demo run the whole flow offline against a fake backend",
@@ -0,0 +1,171 @@
1
+ // `npx sodabase install-mcp` — the hub's "Install MCP for your agent" step as a one-shot subcommand:
2
+ // no sign-in, no fullscreen, just the agent checkbox list (agentPicker.tsx) unless --agent is given. Runs the same add-mcp + skills installs as the wizard
3
+ // (Services.installMcp / installSkill) and prints a plain summary. Sign-in isn't needed here: the MCP server
4
+ // runs its own OAuth the first time the agent calls it.
5
+ import { existsSync, readFileSync } from "node:fs";
6
+ import { homedir } from "node:os";
7
+ import { join } from "node:path";
8
+ import { MCP_URL, SKILL_REF } from "./api/client.js";
9
+ // These ids are forwarded verbatim to BOTH `add-mcp -a` and `skills -a` (see client.ts).
10
+ // Keep every id in this list valid for both CLIs — all three are today; an id only one of
11
+ // them knows would make that tool's install fail (non-fatal, but all-or-nothing for skills).
12
+ // It's also the allowlist for --agent: on Windows the installs spawn through a shell, so a
13
+ // user-supplied id must never reach argv unchecked.
14
+ export const MCP_AGENTS = ["claude-code", "cursor", "codex"];
15
+ const FALLBACK_AGENTS = ["claude-code"];
16
+ // Where each agent leaves its config once installed — used to pick targets when no --agent is given.
17
+ const AGENT_MARKERS = {
18
+ "claude-code": [".claude.json", ".claude"],
19
+ cursor: [".cursor"],
20
+ codex: [".codex"],
21
+ };
22
+ /** The supported agents that look installed under `home` (any marker present). */
23
+ export function detectAgents(home = homedir(), exists = existsSync) {
24
+ return MCP_AGENTS.filter((a) => AGENT_MARKERS[a].some((m) => exists(join(home, m))));
25
+ }
26
+ // The global MCP config add-mcp writes for each agent, how to spot OUR entry in it (name + current URL, so a
27
+ // stale `sodabase` entry pointing at an old/dev host gets refreshed), and where `skills` puts the skill.
28
+ // The substring check first skips parsing a large `~/.claude.json` when our URL isn't in it at all.
29
+ const hasJsonEntry = (text) => text.includes(MCP_URL) &&
30
+ JSON.parse(text).mcpServers?.sodabase?.url === MCP_URL;
31
+ // Line by line, not one regex: our table's keys run from `[mcp_servers.sodabase]` to the next table header, a
32
+ // value may itself contain `[` (`args = ["x"]`), and a `url` under a subtable (`[mcp_servers.sodabase.env]`) isn't ours.
33
+ const TOML_HEADER = /^\s*\[\[?\s*([^\]]+?)\s*\]\]?\s*(#.*)?$/;
34
+ const TOML_URL = /^\s*url\s*=\s*(["'])(.*?)\1\s*(#.*)?$/;
35
+ function hasTomlEntry(text) {
36
+ let ours = false;
37
+ for (const line of text.split(/\r?\n/)) {
38
+ const header = TOML_HEADER.exec(line);
39
+ if (header)
40
+ ours = header[1] === "mcp_servers.sodabase";
41
+ else if (ours && TOML_URL.exec(line)?.[2] === MCP_URL)
42
+ return true;
43
+ }
44
+ return false;
45
+ }
46
+ // Each agent's global skills dir, as the `skills` CLI (1.7.x) has it: Cursor reads its own, Codex the shared one.
47
+ const SKILL_DIR = join("skills", "sodabase-trust-advisor", "SKILL.md");
48
+ const MCP_CONFIGS = {
49
+ "claude-code": { file: ".claude.json", has: hasJsonEntry, skill: join(".claude", SKILL_DIR) },
50
+ cursor: { file: join(".cursor", "mcp.json"), has: hasJsonEntry, skill: join(".cursor", SKILL_DIR) },
51
+ codex: { file: join(".codex", "config.toml"), has: hasTomlEntry, skill: join(".agents", SKILL_DIR) },
52
+ };
53
+ /**
54
+ * The agents (of `among`) already fully set up: a `sodabase` MCP entry at the current URL in their global
55
+ * config, plus the trust-advisor skill when `skill` is wanted (so a missing skill still gets installed).
56
+ * Unreadable/malformed config = not set up.
57
+ */
58
+ export function installedAgents(home = homedir(), skill = true, read = (p) => readFileSync(p, "utf8"), exists = existsSync, among = MCP_AGENTS) {
59
+ return MCP_AGENTS.filter((a) => among.includes(a)).filter((a) => {
60
+ const c = MCP_CONFIGS[a];
61
+ try {
62
+ return c.has(read(join(home, c.file))) && (!skill || exists(join(home, c.skill)));
63
+ }
64
+ catch {
65
+ return false;
66
+ }
67
+ });
68
+ }
69
+ /**
70
+ * Explicit --agent/--all wins (reinstalling is harmless). Otherwise every detected agent that doesn't have
71
+ * the MCP yet — empty when they all do — falling back to Claude Code when no agent is detected at all.
72
+ */
73
+ export function resolveAgents(explicit, detected, installed = []) {
74
+ if (explicit.length)
75
+ return { agents: explicit, detected: false };
76
+ if (!detected.length)
77
+ return { agents: FALLBACK_AGENTS, detected: false };
78
+ return { agents: detected.filter((a) => !installed.includes(a)), detected: true };
79
+ }
80
+ export const INSTALL_MCP_HELP = [
81
+ "sodabase install-mcp — install the Sodabase MCP + trust-advisor skill for your coding agent",
82
+ "",
83
+ "Usage: npx sodabase install-mcp [options]",
84
+ "",
85
+ "Options:",
86
+ ` -a, --agent <id> agent to install for; repeat or comma-separate`,
87
+ ` one of: ${MCP_AGENTS.join(", ")}`,
88
+ " --all install for every supported agent",
89
+ " --no-skill install only the MCP, skip the trust-advisor skill",
90
+ " --no-input don't show the agent checkbox list",
91
+ " --help, -h show this help",
92
+ "",
93
+ "Without --agent, shows a checkbox list with the agents found on this machine ticked, except",
94
+ "those that already have the MCP (claude-code if none found). Without a terminal (or with",
95
+ "--no-input), installs for those directly.",
96
+ "",
97
+ "No sign-in needed: your agent signs in to Sodabase the first time it uses the MCP.",
98
+ "",
99
+ ].join("\n");
100
+ /** Parse the args AFTER `install-mcp`. Returns the options, or an error message for bad input. */
101
+ export function parseInstallMcpArgs(argv) {
102
+ // --help wins over everything else on the line, including bad options.
103
+ if (argv.some((a) => a === "--help" || a === "-h"))
104
+ return { agents: [], skill: true, help: true, input: true };
105
+ const agents = [];
106
+ let skill = true;
107
+ let input = true;
108
+ for (let i = 0; i < argv.length; i++) {
109
+ const arg = argv[i];
110
+ if (arg === "--no-skill")
111
+ skill = false;
112
+ else if (arg === "--no-input")
113
+ input = false;
114
+ else if (arg === "--all")
115
+ agents.push(...MCP_AGENTS);
116
+ else if (arg === "-a" || arg === "--agent") {
117
+ const value = argv[++i];
118
+ if (!value || value.startsWith("-"))
119
+ return { error: `${arg} needs an agent id (${MCP_AGENTS.join(", ")})` };
120
+ agents.push(...value.split(","));
121
+ }
122
+ else if (arg.startsWith("--agent=")) {
123
+ const value = arg.slice("--agent=".length);
124
+ // An empty value (e.g. an unset $AGENT) must fail like `-a` with no value, not fall back to auto-detect.
125
+ if (!value.split(",").some((v) => v.trim()))
126
+ return { error: `--agent needs an agent id (${MCP_AGENTS.join(", ")})` };
127
+ agents.push(...value.split(","));
128
+ }
129
+ else
130
+ return { error: `unknown option: ${arg}` };
131
+ }
132
+ const ids = [...new Set(agents.map((a) => a.trim()).filter(Boolean))];
133
+ const unknown = ids.filter((a) => !MCP_AGENTS.includes(a));
134
+ if (unknown.length)
135
+ return { error: `unknown agent: ${unknown.join(", ")} (supported: ${MCP_AGENTS.join(", ")})` };
136
+ return { agents: ids, skill, help: false, input };
137
+ }
138
+ /** Run the install and print the outcome. Returns the process exit code (1 only if the MCP itself failed). */
139
+ export async function runInstallMcp(services, opts, out) {
140
+ out(`Installing the Sodabase MCP for ${opts.agents.join(", ")}${opts.detected ? " (found on this machine)" : ""}…`);
141
+ try {
142
+ const r = await services.installMcp(opts.agents);
143
+ out(`Ran: ${r.command}`);
144
+ for (const w of r.wrote)
145
+ out(` ✔ ${w.agent} → ${w.path}${opts.installed?.includes(w.agent) ? " (was already set up, refreshed)" : ""}`);
146
+ }
147
+ catch (e) {
148
+ out(`Couldn't auto-install the MCP: ${e instanceof Error ? e.message : String(e)}`);
149
+ out("Add it yourself:");
150
+ for (const a of opts.agents)
151
+ out(a === "claude-code"
152
+ ? ` claude mcp add --scope user --transport http sodabase ${MCP_URL}`
153
+ : ` npx add-mcp ${MCP_URL} -g -a ${a}`);
154
+ return 1;
155
+ }
156
+ // Same contract as the wizard: the MCP is the main thing, so a skill failure warns with a manual
157
+ // fallback but doesn't fail the command.
158
+ if (opts.skill) {
159
+ try {
160
+ await services.installSkill(opts.agents);
161
+ out(` ✔ trust-advisor skill → ${SKILL_REF}`);
162
+ }
163
+ catch (e) {
164
+ out(`Couldn't install the trust-advisor skill: ${e instanceof Error ? e.message : String(e)}`);
165
+ out("Add it yourself:");
166
+ out(` npx skills add ${SKILL_REF}`);
167
+ }
168
+ }
169
+ out("Ready next time you restart your agent.");
170
+ return 0;
171
+ }
package/dist/ui.js CHANGED
@@ -4,6 +4,9 @@ import { createRequire } from "node:module";
4
4
  import React, { createContext, useContext, useEffect, useRef, useState } from "react";
5
5
  import { ApiError, anomalyCount, totalIssues } from "./api/types.js";
6
6
  import { saveCreds } from "./config/tokenStore.js";
7
+ import { AgentChecklist, useAgentChecklist } from "./agentPicker.js";
8
+ import { MCP_URL } from "./api/client.js";
9
+ import { detectAgents, installedAgents as agentsSetUp, resolveAgents } from "./installMcp.js";
7
10
  // ── utils ─────────────────────────────────────────────────────────────────────
8
11
  const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
9
12
  function useSpinner() {
@@ -711,14 +714,16 @@ export function ScopeAdjust({ onDone }) {
711
714
  })()) })] }));
712
715
  }
713
716
  // ── Phase: consented in-flow MCP install ─────────────────────────────────────────
714
- // These ids are forwarded verbatim to BOTH `add-mcp -a` and `skills -a` (see client.ts).
715
- // Keep every id in this list valid for both CLIs — all three are today; an id only one of
716
- // them knows would make that tool's install fail (non-fatal, but all-or-nothing for skills).
717
- const AGENTS = ["claude-code", "cursor", "codex"];
717
+ // Same agents, preselection and checkbox list as `install-mcp` (see installMcp.ts / agentPicker.tsx).
718
718
  export function McpInstall({ onDone }) {
719
719
  const { services, fast, interactive } = useWizard();
720
- const [sel, setSel] = useState([true, false, false]);
721
- const [cursor, setCursor] = useState(0);
720
+ // Ticked to start: the agents found on this machine that don't have the MCP yet (claude-code if none found).
721
+ const [local] = useState(() => {
722
+ const found = detectAgents();
723
+ const installed = agentsSetUp();
724
+ return { found, installed, preselected: resolveAgents([], found, installed).agents };
725
+ });
726
+ const list = useAgentChecklist(local.preselected);
722
727
  const [result, setResult] = useState(null);
723
728
  const [skillResult, setSkillResult] = useState(null);
724
729
  const [skillError, setSkillError] = useState(null);
@@ -802,22 +807,14 @@ export function McpInstall({ onDone }) {
802
807
  onDone({ installed: [] });
803
808
  return;
804
809
  }
805
- if (key.upArrow)
806
- setCursor((c) => Math.max(0, c - 1));
807
- else if (key.downArrow)
808
- setCursor((c) => Math.min(AGENTS.length - 1, c + 1));
809
- else if (input === " ")
810
- setSel((s) => s.map((v, i) => (i === cursor ? !v : v)));
811
- else if (input === "n")
810
+ if (list.handleKey(input, key))
811
+ return;
812
+ if (input === "n")
812
813
  void run([]);
813
814
  else if (key.return)
814
- void run(AGENTS.filter((_, i) => sel[i]));
815
+ void run(list.picked());
815
816
  }, { isActive: interactive && !busy && (!result || skillError !== null || ready) });
816
- return (_jsxs(Box, { flexDirection: "column", paddingX: 2, marginTop: 1, alignItems: "center", children: [_jsx(Eyebrow, { children: "Set up your coding agent (optional)" }), error ? (_jsxs(Box, { marginTop: 1, flexDirection: "column", children: [_jsxs(Text, { color: "yellow", children: ["Couldn't auto-install the MCP: ", error] }), _jsx(Text, { dimColor: true, children: "Add it yourself (Claude Code):" }), _jsxs(Text, { color: "cyan", children: [" ", "claude mcp add --transport http sodabase https://sodabase.io/mcp"] }), interactive && (_jsx(Box, { marginTop: 1, children: _jsx(Text, { dimColor: true, children: "enter to continue" }) }))] })) : result ? (_jsxs(Box, { marginTop: 1, flexDirection: "column", children: [_jsxs(Text, { dimColor: true, children: ["Ran: ", result.command] }), result.wrote.map((w) => (_jsxs(Text, { children: [" ", _jsx(Text, { color: "green", children: "\u2714" }), " ", w.agent, " ", _jsxs(Text, { dimColor: true, children: ["\u2192 ", w.path] })] }, w.agent))), skillResult && (_jsxs(Text, { children: [" ", _jsx(Text, { color: "green", children: "\u2714" }), " trust-advisor skill ", _jsx(Text, { dimColor: true, children: "\u2192 sodabase/agent-skills" })] })), skillError && (_jsxs(Box, { flexDirection: "column", children: [_jsxs(Text, { color: "yellow", children: ["Couldn't install the trust-advisor skill: ", skillError] }), _jsx(Text, { dimColor: true, children: "Add it yourself:" }), _jsxs(Text, { color: "cyan", children: [" ", "npx skills add sodabase/agent-skills"] })] })), _jsx(Text, { color: "green", children: "Ready next time you restart your agent." }), (ready || skillError) && interactive && (_jsx(Box, { marginTop: 1, children: _jsx(Text, { dimColor: true, children: "enter to continue" }) }))] })) : (_jsxs(_Fragment, { children: [_jsxs(Box, { marginTop: 1, flexDirection: "column", children: [_jsx(Text, { dimColor: true, children: "Install the Sodabase MCP + trust-advisor skill so your agent can ask \"is this data safe to trust?\"" }), _jsx(Text, { dimColor: true, children: "Explicit \u2014 we show the exact change and only write on your confirm." })] }), _jsx(Box, { marginTop: 1, flexDirection: "column", children: AGENTS.map((a, i) => {
817
- const on = sel[i];
818
- const here = interactive && i === cursor;
819
- return (_jsxs(Text, { color: on ? "green" : undefined, dimColor: !on, children: [here ? "❯ " : " ", on ? "[x]" : "[ ]", " ", a] }, a));
820
- }) })] }))] }));
817
+ return (_jsxs(Box, { flexDirection: "column", paddingX: 2, marginTop: 1, alignItems: "center", children: [_jsx(Eyebrow, { children: "Set up your coding agent (optional)" }), error ? (_jsxs(Box, { marginTop: 1, flexDirection: "column", children: [_jsxs(Text, { color: "yellow", children: ["Couldn't auto-install the MCP: ", error] }), _jsx(Text, { dimColor: true, children: "Add it yourself (Claude Code):" }), _jsxs(Text, { color: "cyan", children: [" ", "claude mcp add --transport http sodabase ", MCP_URL] }), interactive && (_jsx(Box, { marginTop: 1, children: _jsx(Text, { dimColor: true, children: "enter to continue" }) }))] })) : result ? (_jsxs(Box, { marginTop: 1, flexDirection: "column", children: [_jsxs(Text, { dimColor: true, children: ["Ran: ", result.command] }), result.wrote.map((w) => (_jsxs(Text, { children: [" ", _jsx(Text, { color: "green", children: "\u2714" }), " ", w.agent, " ", _jsxs(Text, { dimColor: true, children: ["\u2192 ", w.path] })] }, w.agent))), skillResult && (_jsxs(Text, { children: [" ", _jsx(Text, { color: "green", children: "\u2714" }), " trust-advisor skill ", _jsx(Text, { dimColor: true, children: "\u2192 sodabase/agent-skills" })] })), skillError && (_jsxs(Box, { flexDirection: "column", children: [_jsxs(Text, { color: "yellow", children: ["Couldn't install the trust-advisor skill: ", skillError] }), _jsx(Text, { dimColor: true, children: "Add it yourself:" }), _jsxs(Text, { color: "cyan", children: [" ", "npx skills add sodabase/agent-skills"] })] })), _jsx(Text, { color: "green", children: "Ready next time you restart your agent." }), (ready || skillError) && interactive && (_jsx(Box, { marginTop: 1, children: _jsx(Text, { dimColor: true, children: "enter to continue" }) }))] })) : (_jsxs(_Fragment, { children: [_jsxs(Box, { marginTop: 1, flexDirection: "column", children: [_jsx(Text, { dimColor: true, children: "Install the Sodabase MCP + trust-advisor skill so your agent can ask \"is this data safe to trust?\"" }), _jsx(Text, { dimColor: true, children: "Explicit \u2014 we show the exact change and only write on your confirm." })] }), _jsx(Box, { marginTop: 1, children: _jsx(AgentChecklist, { sel: list.sel, cursor: interactive ? list.cursor : null, found: local.found, installed: local.installed }) })] }))] }));
821
818
  }
822
819
  // ── Phase: manage projects (the hub's "Manage projects" entry) ───────────────────
823
820
  // A picker over the projects already being watched; selecting one drills into its watched tables.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sodabase",
3
- "version": "0.1.9",
3
+ "version": "0.1.10",
4
4
  "description": "Sodabase onboarding wizard — interactive CLI (npx sodabase).",
5
5
  "license": "UNLICENSED",
6
6
  "homepage": "https://sodabase.io",
@@ -26,7 +26,7 @@
26
26
  "access": "public"
27
27
  },
28
28
  "bin": {
29
- "sodabase": "dist/cli.js"
29
+ "sodabase": "./dist/cli.js"
30
30
  },
31
31
  "files": [
32
32
  "dist"