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
8 changes: 4 additions & 4 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ just react-fmt # Format UI with Prettier
`viper.SetDefault()` in `cmd/root.go`
- **`pkg/sdk/`** - Go SDK for programmatic REST API access (`client/` client
library). See @docs/docs/sidebar/sdk/guidelines.md for SDK development rules
- Shared `nats-client` and `nats-server` are sibling repos linked via `replace`
in `go.mod`
- Shared `nats-client` and `nats-server` are sibling repos, consumed as pinned
module versions in `go.mod` (no `replace` directive)

## UI Architecture (Quick Reference)

Expand Down Expand Up @@ -769,8 +769,8 @@ the same principles as the orchestrator examples:
- `cmd/client_node_{domain}_{operation}.go` — one subcommand per endpoint (e.g.,
`client_node_sysctl_get.go`)
- All commands support `--json` for raw output
- Use `printKV` for inline key-value output and `printStyledTable` for multi-row
tabular data (both in `cmd/ui.go`)
- Use `cli.PrintKV` for inline key-value output and `cli.PrintCompactTable` for
multi-row tabular data (both in `internal/cli/ui.go`)
- Use flags (e.g., `--job-id`, `--audit-id`) instead of positional args for
resource IDs
- Handle **all** API response codes in the `switch resp.StatusCode()` block:
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/sidebar/architecture/system-architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ The system is organized into six layers, top to bottom:
| **Job Client** | `internal/job/client/` | Business logic for job CRUD and status |
| **NATS JetStream** | (external) | KV `job-queue`, Stream `JOBS`, KV `job-responses`, KV `agent-registry` |
| **Agent / Provider Layer** | `internal/agent/`, `internal/provider/` | Consumes jobs, executes providers, evaluates conditions, drain lifecycle, heartbeat |
| **Notifications** | `internal/notify/` | Watches registry KV for condition transitions; dispatches events via pluggable notifiers |
| **Notifications** | `internal/controller/notify/` | Watches registry KV for condition transitions; dispatches events via pluggable notifiers |

```mermaid
graph TD
Expand Down
14 changes: 7 additions & 7 deletions docs/docs/sidebar/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,13 @@ osapi client health

## Explore the Docs

- [Features](sidebar/features/node-management.md) — what OSAPI can manage and
how each feature works
- [Architecture](sidebar/architecture/architecture.md) — how the three processes
(NATS, API server, agent) fit together
- [Configuration](sidebar/usage/configuration.md) — full `osapi.yaml` reference
- [API](category/api) — OpenAPI documentation for all endpoints
- [CLI Usage](sidebar/usage/usage.mdx) — command reference with examples
- [Features](features/node-management.md) — what OSAPI can manage and how each
feature works
- [Architecture](architecture/architecture.md) — how the three processes (NATS,
API server, agent) fit together
- [Configuration](usage/configuration.md) — full `osapi.yaml` reference
- [API](/category/api) — OpenAPI documentation for all endpoints
- [CLI Usage](usage/usage.mdx) — command reference with examples

## Alternatives

Expand Down
20 changes: 11 additions & 9 deletions docs/docs/sidebar/usage/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,15 +121,17 @@ Environment variables take precedence over file values.

## Required Fields

Two fields carry a `required` validation tag and must be set before the server
or client will start:

| Key | Purpose |
| ----------------------------------------- | ---------------------------------- |
| `controller.api.security.signing_key` | HS256 key for signing JWTs |
| `controller.client.security.bearer_token` | JWT sent with client requests |
| `controller.metrics.enabled` | `OSAPI_CONTROLLER_METRICS_ENABLED` |
| `controller.metrics.port` | `OSAPI_CONTROLLER_METRICS_PORT` |
Seven fields carry a `required` validation tag. Five of them
(`nats.stream.name`, `nats.stream.subjects`, `nats.kv.bucket`,
`nats.kv.response_bucket`, and `nats.registry.bucket`) are given defaults via
`viper.SetDefault()`, so they satisfy validation without appearing in your
config file. Two have no default and must be set before the server or client
will start:

| Key | Purpose |
| ----------------------------------------- | ----------------------------- |
| `controller.api.security.signing_key` | HS256 key for signing JWTs |
| `controller.client.security.bearer_token` | JWT sent with client requests |

Generate a signing key with `openssl rand -hex 32`. Generate a bearer token with
`osapi token generate`.
Expand Down
Loading