Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

---

## [Unreleased]

### BREAKING

- Replace `agentage init`, `agentage login`, `agentage logout` with unified `agentage setup` command. Interactive by default (one confirmation prompt), fully headless with `--yes` / `--token` / `--machine-id` flags. `--disconnect` replaces `logout`; `--reauth` re-runs OAuth. Callers invoking the old commands will receive `unknown command` from Commander.

## [0.19.0] - 2026-04-19

### New Features
Expand Down
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ Two built-in factories: **markdown** (`.agent.md` files with YAML frontmatter) a

### Hub Sync

When authenticated (`agentage login`), the daemon connects to the hub via WebSocket — registering the machine, syncing agents, and relaying run events.
When authenticated (`agentage setup`), the daemon connects to the hub via WebSocket — registering the machine, syncing agents, and relaying run events.

| Method | Endpoint | Description |
| ------ | ------------------- | ------------------------------------- |
Expand Down Expand Up @@ -141,7 +141,7 @@ The daemon is designed to keep its hub connection alive across transient network

**Auth handling.** Token refresh is attempted both proactively (before each heartbeat, if within 5 min of expiry) and reactively (on any hub API 401 response). Refresh uses the Supabase refresh token fetched from `/api/health`. A failed refresh surfaces as a warning but does not kill the daemon — the next reconnect cycle will retry.

**Offline mode.** If no auth is present at startup, the daemon runs in standalone mode: local agent execution still works via the REST API and local WebSocket (`/ws`), but no hub sync is attempted. Running `agentage login` after the fact requires a daemon restart to pick up the new auth.
**Offline mode.** If no auth is present at startup, the daemon runs in standalone mode: local agent execution still works via the REST API and local WebSocket (`/ws`), but no hub sync is attempted. Running `agentage setup` after the fact requires a daemon restart to pick up the new auth.

## CLI Commands

Expand All @@ -154,8 +154,8 @@ The daemon is designed to keep its hub connection alive across transient network
| `agentage machines` | List hub-connected machines |
| `agentage status` | Show daemon and hub status |
| `agentage logs` | View daemon logs |
| `agentage login` | Authenticate with the hub |
| `agentage logout` | Log out |
| `agentage setup` | Configure machine + hub + auth (interactive or headless) |
| `agentage setup --disconnect` | Deregister and remove credentials |

## Project Structure

Expand All @@ -171,8 +171,7 @@ src/
│ ├── machines.ts # agentage machines
│ ├── status.ts # agentage status
│ ├── logs.ts # agentage logs
│ ├── login.ts # agentage login
│ └── logout.ts # agentage logout
│ └── setup.ts # agentage setup
├── daemon/ # Daemon server
│ ├── server.ts # Express + HTTP server setup
│ ├── routes.ts # REST API routes
Expand Down
8 changes: 2 additions & 6 deletions src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,12 @@ import { registerAgents } from './commands/agents.js';
import { registerRuns } from './commands/runs.js';
import { registerMachines } from './commands/machines.js';
import { registerStatus } from './commands/status.js';
import { registerLogin } from './commands/login.js';
import { registerLogout } from './commands/logout.js';
import { registerLogs } from './commands/logs.js';
import { registerDaemon } from './commands/daemon-cmd.js';
import { registerWhoami } from './commands/whoami.js';
import { registerCompletions } from './commands/completions.js';
import { registerConfig } from './commands/config-cmd.js';
import { registerInit } from './commands/init.js';
import { registerSetup } from './commands/setup.js';
import { createCreateCommand } from './commands/create.js';
import { registerUpdate } from './commands/update.js';
import { registerProjects } from './commands/projects.js';
Expand All @@ -33,14 +31,12 @@ registerAgents(program);
registerRuns(program);
registerMachines(program);
registerStatus(program);
registerLogin(program);
registerLogout(program);
registerLogs(program);
registerDaemon(program);
registerWhoami(program);
registerCompletions(program);
registerConfig(program);
registerInit(program);
registerSetup(program);
program.addCommand(createCreateCommand());
registerUpdate(program);
registerProjects(program);
Expand Down
2 changes: 1 addition & 1 deletion src/commands/agents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ const listHubAgents = async (jsonMode: boolean): Promise<void> => {
try {
agents = await get<HubAgent[]>('/api/hub/agents');
} catch {
console.error(chalk.red("Not connected to hub. Run 'agentage login' first."));
console.error(chalk.red("Not connected to hub. Run 'agentage setup' first."));
process.exitCode = 1;
return;
}
Expand Down
105 changes: 0 additions & 105 deletions src/commands/init.test.ts

This file was deleted.

60 changes: 0 additions & 60 deletions src/commands/init.ts

This file was deleted.

Loading