Initial server source import

This commit is contained in:
sashatrask
2026-09-30 20:30:56 +03:00
commit 170dd941b9
498 changed files with 261563 additions and 0 deletions
@@ -0,0 +1,41 @@
## ADDED Requirements
### Requirement: Cross-platform lifecycle command surface
The packaged worker SHALL expose start, stop, attach, status, and watch operations with equivalent local-control semantics on Windows, native Linux, and Docker.
#### Scenario: Operator watches a running worker
- **WHEN** an operator runs `watch` for a bounded interval
- **THEN** the CLI emits coherent live status and detaches without stopping the worker
#### Scenario: Operator stops a worker
- **WHEN** an operator requests a graceful stop while the worker can complete its local drain
- **THEN** the CLI returns a clean shutdown receipt without requiring a server-side assignment-cap change
### Requirement: Installation credentials can come from YAML
The worker SHALL accept a bounded strict YAML installation document containing the HTTPS server origin, device token, and positive local parallelism instead of requiring those values in process arguments.
#### Scenario: Install from a private YAML file
- **WHEN** an operator invokes `install --config` with a private valid YAML file
- **THEN** the worker verifies the package and persists the existing private installed configuration without exposing the token in argv
#### Scenario: Install from redirected standard input
- **WHEN** a Docker operator redirects a valid YAML document to `install --config -`
- **THEN** the worker performs the same installation without placing the token in the Compose or container command
#### Scenario: Reject ambiguous installation input
- **WHEN** YAML input is malformed, has extra fields, exceeds its byte bound, or is combined with direct server/token arguments
- **THEN** installation fails before writing worker configuration
### Requirement: Native Linux package is directly operable
An assembled native Linux worker package SHALL include an executable package-root launcher for the same operator CLI used by Windows and Docker.
#### Scenario: Linux operator runs from the extracted package root
- **WHEN** the operator invokes `./truf-worker status`
- **THEN** the integrity-checking bootstrap runs with the package-local application and dependencies
### Requirement: Platform cheatsheets are executable and capacity-independent
The active operator documentation SHALL provide separate Windows, native Linux, and Docker copy-paste cheatsheets whose lifecycle commands are verified against the corresponding packaged artifact and do not instruct routine use of server cap `0`.
#### Scenario: Operator follows one platform sheet
- **WHEN** an operator starts from the documented artifact or Compose root
- **THEN** installation, start, status, attach, watch, and clean stop require only the documented local files and commands