diff --git a/README.md b/README.md index 70b7ff2..ba7de0c 100644 --- a/README.md +++ b/README.md @@ -55,11 +55,11 @@ Skills compose by adoption-list order (`10123`) and trigger tags carry runtime e Didactyl will support local inference, which is very privacy preserving. Remote inference does however have it's advantages, and in those cases Didactyl supports using Bitcoin Lightning and eCash inference providers. -## Current Status — v0.0.74 +## Current Status — v0.0.75 **Active build — this project is barely working. Experiment at your own risk.** -> Last release update: v0.0.74 — Add default skill d-tag so startup-published kind 31124 events seed self-skill cache and appear in available skills +> Last release update: v0.0.75 — Add rsync deploy script and wizard root-shell handoff for service install path - Connects to configured relays with auto-reconnect and relay state transition logging - Publishes configured startup events per relay as each relay becomes connected diff --git a/deploy_lt.sh b/deploy_lt.sh new file mode 100755 index 0000000..495dbe3 --- /dev/null +++ b/deploy_lt.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +set -euo pipefail + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +SOURCE_BINARY="$SCRIPT_DIR/didactyl_static_x86_64" +REMOTE_TARGET="ubuntu@laantungir.net:~/didactyl" + +if ! command -v rsync >/dev/null 2>&1; then + echo "ERROR: rsync is not installed or not in PATH" + exit 1 +fi + +if [ ! -f "$SOURCE_BINARY" ]; then + echo "ERROR: Source binary not found: $SOURCE_BINARY" + echo "Build it first so didactyl_static_x86_64 exists." + exit 1 +fi + +echo "Deploying $SOURCE_BINARY to $REMOTE_TARGET" +rsync -avz --progress "$SOURCE_BINARY" "$REMOTE_TARGET" +echo "Deployment complete." \ No newline at end of file diff --git a/src/main.h b/src/main.h index e695ea5..e474b67 100644 --- a/src/main.h +++ b/src/main.h @@ -12,8 +12,8 @@ // Using DIDACTYL_ prefix to avoid conflicts with nostr_core_lib VERSION macros #define DIDACTYL_VERSION_MAJOR 0 #define DIDACTYL_VERSION_MINOR 0 -#define DIDACTYL_VERSION_PATCH 74 -#define DIDACTYL_VERSION "v0.0.74" +#define DIDACTYL_VERSION_PATCH 75 +#define DIDACTYL_VERSION "v0.0.75" // Agent metadata #define DIDACTYL_NAME "Didactyl" diff --git a/src/setup_wizard.c b/src/setup_wizard.c index 31324a2..441c96a 100644 --- a/src/setup_wizard.c +++ b/src/setup_wizard.c @@ -1373,7 +1373,24 @@ static int install_system_service_with_dedicated_user(const didactyl_config_t* c if (!cfg || cfg->keys.nsec[0] == '\0') return -1; if (geteuid() != 0) { - fprintf(stderr, "%sSystem install requires root (run with sudo).%s\n", ANSI_RED, ANSI_RESET); + fprintf(stderr, "%sSystem install requires root.%s\n", ANSI_RED, ANSI_RESET); + fprintf(stderr, " You can open a root shell now and then re-run this install step.\n"); + print_option('o', "pen root shell now (sudo -i)"); + print_option('r', "eturn without installing"); + wizard_option_t root_opts[] = {{'o', ""}, {'r', ""}}; + char root_choice = read_menu_choice(root_opts, 2); + + if (root_choice == 'o') { + char* sudo_argv[] = {"sudo", "-i", NULL}; + if (run_command_local(sudo_argv) != 0) { + fprintf(stderr, "%sFailed to open root shell via sudo.%s\n", ANSI_RED, ANSI_RESET); + } else { + fprintf(stderr, "%sReturned from root shell.%s\n", ANSI_YELLOW, ANSI_RESET); + } + fprintf(stderr, + " Re-run didactyl as root and choose install again to complete system service setup.\n"); + } + return -1; }