🤖 codex: remove setup/doctor apps (n/a)
What: - drop clawdis-setup/doctor packages and references - simplify HM package list and RFC outputs - trim docs mentioning setup/doctor Why: - keep onboarding agent-first and avoid extra CLI tooling Tests: - not run (docs/config changes only)
This commit is contained in:
parent
e1429c78be
commit
58d48e1bc5
@ -47,7 +47,6 @@ clawdis health
|
||||
|
||||
- macOS-only (nix-darwin + Home Manager)
|
||||
- Telegram-first docs + defaults
|
||||
- Guided setup app (`nix run nix-clawdis#clawdis-setup`)
|
||||
- Troubleshooting checklist + health checks
|
||||
|
||||
## Not included (v1)
|
||||
|
||||
@ -43,7 +43,7 @@ Non-goals:
|
||||
- A Nix package derivation for Clawdis.
|
||||
- A Home Manager module for user-level config and service wiring.
|
||||
- A nix-darwin module for macOS users (optional, thin wrapper over HM).
|
||||
- A flake with devShell + example configs + minimal CLI apps.
|
||||
- A flake with devShell + example configs.
|
||||
- Documentation and examples optimized for new users and agents.
|
||||
|
||||
## 4) Components and responsibilities
|
||||
@ -51,10 +51,8 @@ Non-goals:
|
||||
- **Package derivation**: builds Clawdis from a pinned source (tag or rev) and exposes a binary.
|
||||
- **Home Manager module**: declarative config, writes `~/.clawdis/clawdis.json`, manages services.
|
||||
- **Flake outputs**:
|
||||
- `packages.<system>.clawdis` (binary)
|
||||
- `apps.<system>.clawdis` (CLI)
|
||||
- `apps.<system>.clawdis-setup` (guided setup -> emits Nix snippet)
|
||||
- `apps.<system>.clawdis-doctor` (health + config validation)
|
||||
- `packages.<system>.clawdis-gateway` (binary)
|
||||
- `apps.<system>.clawdis` (gateway CLI)
|
||||
- `devShells.<system>.default` (docs + lint + tests)
|
||||
- `homeManagerModules.clawdis`
|
||||
- `darwinModules.clawdis` (if needed)
|
||||
@ -84,7 +82,7 @@ Defaults:
|
||||
|
||||
- **Safe defaults vs. zero-friction**: default-off providers reduce risk but require explicit config. We accept the extra step for safety and clarity.
|
||||
- **Home Manager first**: HM is the clearest UX for user config, but NixOS-only users must adopt HM or a thin wrapper module.
|
||||
- **Guided setup wizard**: adds maintenance overhead, but it is the fastest path for non-Nix users.
|
||||
- **Agent copypasta**: single prompt is the fastest path for non-Nix users.
|
||||
|
||||
## 5) Inputs / workflow profiles
|
||||
|
||||
@ -186,17 +184,8 @@ Users interact via:
|
||||
Agent-friendly flow:
|
||||
- Docs include a “copy-paste config” section with clear placeholders.
|
||||
- A guided troubleshooting checklist with exact commands and expected output.
|
||||
- `nix run nix-clawdis#clawdis-setup` produces a minimal Nix snippet from a short prompt flow.
|
||||
|
||||
### 9.1) Guided setup UX contract (clawdis-setup)
|
||||
|
||||
The wizard must:
|
||||
- Ask only for provider selection, tokens/file paths, and allowlist IDs.
|
||||
- Output a complete Nix snippet ready to paste into a flake or HM config.
|
||||
- Never print secrets to stdout unless explicitly confirmed.
|
||||
- End with a one-line “next command to run” (build + health check).
|
||||
|
||||
### 9.2) Zero to Clawdis (no-Nix user path)
|
||||
### 9.1) Zero to Clawdis (no-Nix user path)
|
||||
|
||||
The public docs must include a step-by-step “Zero to Clawdis” guide that covers:
|
||||
1) Install Determinate Nix on macOS (copy/paste command + link).
|
||||
@ -206,7 +195,7 @@ The public docs must include a step-by-step “Zero to Clawdis” guide that cov
|
||||
5) Paste minimal config snippet (Telegram or WhatsApp).
|
||||
6) Run build and verify with `clawdis status` / `clawdis health`.
|
||||
|
||||
### 9.3) Agent copypasta (Codex/Claude)
|
||||
### 9.2) Agent copypasta (Codex/Claude)
|
||||
|
||||
Provide a single prompt users can paste into a coding agent that results in:
|
||||
- Determinate Nix installed (if missing).
|
||||
@ -276,14 +265,14 @@ Docs structure (public-facing):
|
||||
1) Create `nix-clawdis` repo structure and flake.
|
||||
2) Implement package derivation (pin Clawdis source).
|
||||
3) Implement HM module with schema validation and config generation.
|
||||
4) Add CLI apps (`clawdis`, `clawdis status`, `clawdis health`).
|
||||
4) Document CLI usage (`clawdis` gateway).
|
||||
5) Add examples + docs (README + quickstarts + troubleshooting).
|
||||
6) Add CI for build + formatting + docs checks.
|
||||
|
||||
## 17) Brutal self-review (required)
|
||||
|
||||
Findings (by persona):
|
||||
- Junior engineer: Needed a concrete “wizard contract” and copy‑paste snippet. Added 9.1 + example config.
|
||||
- Junior engineer: Needed a concrete agent copypasta and example config. Added 9.1.
|
||||
- Mid-level engineer: Lacked explicit module option schema and defaults. Added 4.1 + defaults.
|
||||
- Senior/principal engineer: Missing tradeoff framing and rollback plan. Added 4.2 + 15.1.
|
||||
- PM: Success criteria needed to be explicit. Added 10‑minute onboarding goal in section 2.
|
||||
@ -303,7 +292,7 @@ Second pass review (delta):
|
||||
## 18) Implementation status (current)
|
||||
|
||||
Implemented in `nix-clawdis` repo:
|
||||
- Flake outputs: package + apps + devShell + HM module + darwin wrapper
|
||||
- Flake outputs: package + app + devShell + HM module + darwin wrapper
|
||||
- Clawdis gateway package pinned to `d4ee40db53a1d00b448a1153f2be58007213110f`
|
||||
- Telegram-first HM module (launchd on macOS)
|
||||
- README + Zero-to-Clawdis + Agent Copypasta + Quickstart/Config/Troubleshooting docs
|
||||
|
||||
@ -1,11 +1,5 @@
|
||||
# Troubleshooting
|
||||
|
||||
## Check config exists
|
||||
|
||||
```bash
|
||||
clawdis-doctor
|
||||
```
|
||||
|
||||
## Check launchd status (macOS)
|
||||
|
||||
```bash
|
||||
|
||||
@ -20,15 +20,11 @@
|
||||
{
|
||||
packages = {
|
||||
clawdis-gateway = pkgs.clawdis-gateway;
|
||||
clawdis-setup = pkgs.clawdis-setup;
|
||||
clawdis-doctor = pkgs.clawdis-doctor;
|
||||
default = pkgs.clawdis-gateway;
|
||||
};
|
||||
|
||||
apps = {
|
||||
clawdis = flake-utils.lib.mkApp { drv = pkgs.clawdis-gateway; };
|
||||
clawdis-setup = flake-utils.lib.mkApp { drv = pkgs.clawdis-setup; };
|
||||
clawdis-doctor = flake-utils.lib.mkApp { drv = pkgs.clawdis-doctor; };
|
||||
};
|
||||
|
||||
devShells.default = pkgs.mkShell {
|
||||
|
||||
@ -130,7 +130,7 @@ in {
|
||||
}
|
||||
];
|
||||
|
||||
home.packages = [ cfg.package pkgs.clawdis-doctor pkgs.clawdis-setup ];
|
||||
home.packages = [ cfg.package ];
|
||||
|
||||
home.file.".clawdis/clawdis.json".text = configJson;
|
||||
|
||||
|
||||
@ -4,10 +4,6 @@ let
|
||||
clawdisGateway = super.callPackage ./packages/clawdis-gateway.nix {
|
||||
inherit sourceInfo;
|
||||
};
|
||||
clawdisSetup = super.callPackage ./packages/clawdis-setup.nix { };
|
||||
clawdisDoctor = super.callPackage ./packages/clawdis-doctor.nix { };
|
||||
in {
|
||||
clawdis-gateway = clawdisGateway;
|
||||
clawdis-setup = clawdisSetup;
|
||||
clawdis-doctor = clawdisDoctor;
|
||||
}
|
||||
|
||||
@ -1,31 +0,0 @@
|
||||
{ lib, writeShellScriptBin }:
|
||||
|
||||
writeShellScriptBin "clawdis-doctor" ''
|
||||
set -euo pipefail
|
||||
|
||||
config="$HOME/.clawdis/clawdis.json"
|
||||
log="$HOME/.clawdis/logs/clawdis-gateway.log"
|
||||
|
||||
if [ ! -f "$config" ]; then
|
||||
echo "clawdis-doctor: missing config at $config" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if launchctl print gui/$UID/com.joshp123.clawdis.gateway >/dev/null 2>&1; then
|
||||
echo "launchd: running"
|
||||
else
|
||||
echo "launchd: not running (try: launchctl kickstart -k gui/$UID/com.joshp123.clawdis.gateway)"
|
||||
fi
|
||||
|
||||
if [ -f "$log" ]; then
|
||||
echo "log: $log"
|
||||
else
|
||||
echo "log: missing ($log)"
|
||||
fi
|
||||
|
||||
if command -v clawdis >/dev/null 2>&1; then
|
||||
echo "cli: clawdis found"
|
||||
else
|
||||
echo "cli: clawdis not on PATH"
|
||||
fi
|
||||
''
|
||||
@ -1,46 +0,0 @@
|
||||
{ lib, writeShellScriptBin }:
|
||||
|
||||
writeShellScriptBin "clawdis-setup" ''
|
||||
set -euo pipefail
|
||||
|
||||
echo "Clawdis setup (Telegram-first, macOS)"
|
||||
echo "-------------------------------------"
|
||||
|
||||
default_token_file="/run/agenix/telegram-bot-token"
|
||||
read -r -p "Telegram bot token file [${default_token_file}]: " token_file
|
||||
token_file="${token_file:-$default_token_file}"
|
||||
|
||||
read -r -p "Allowed chat IDs (space-separated, required): " allow_from
|
||||
if [ -z "$allow_from" ]; then
|
||||
echo "error: allowFrom is required" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
default_workspace="$HOME/.clawdis/workspace"
|
||||
read -r -p "Workspace dir [${default_workspace}]: " workspace_dir
|
||||
workspace_dir="${workspace_dir:-$default_workspace}"
|
||||
|
||||
echo ""
|
||||
echo "Paste this into your Home Manager config:"
|
||||
echo ""
|
||||
cat <<SNIPPET
|
||||
{
|
||||
programs.clawdis = {
|
||||
enable = true;
|
||||
workspaceDir = "${workspace_dir}";
|
||||
providers.telegram = {
|
||||
enable = true;
|
||||
botTokenFile = "${token_file}";
|
||||
allowFrom = [ ${allow_from} ];
|
||||
};
|
||||
routing.queue.mode = "interrupt";
|
||||
};
|
||||
}
|
||||
SNIPPET
|
||||
|
||||
echo ""
|
||||
echo "Next commands:"
|
||||
echo " home-manager switch --flake .#<profile>"
|
||||
echo " clawdis status"
|
||||
echo " clawdis health"
|
||||
''
|
||||
Loading…
Reference in New Issue
Block a user