rename & spec #2

Open
opened 2026-03-10 05:00:43 +00:00 by despiegk · 3 comments
Owner

use skill /hero_crates_best_practices_check

put a readme in each of the folders

organize the repo well

initial start

./crates/codesmith_ui
./crates/codesmith_lib
./crates/codesmiths_server
./crates/codesmith_ssh
./crates/codesmith

put a spec document in each directory (SPECIFICATIONS.md)

Here is a minimal spec for CodeSmith.

CodeSmith — Minimal Specification

1. Purpose

CodeSmith is a remote development orchestration module that prepares and manages secure development environments on remote servers over SSH.

Its first goal is simple:

  • connect to remote machines over SSH
  • install and run a small CodeSmith server on each machine
  • expose that server locally through SSH forwarding to a local socket
  • treat each forwarded local socket as a controllable remote development node
  • let the node create and manage isolated development users and workspaces

This is only the skeleton for further work.


2. High-Level Concept

CodeSmith consists of two parts:

2.1 Local controller

Runs on the operator/developer machine.

Responsibilities:

  • connect to remote nodes over SSH
  • bootstrap the remote CodeSmith server
  • maintain SSH tunnels / port forwards / socket forwards
  • expose each remote node as a local endpoint
  • talk to the remote server over OpenRPC
  • orchestrate multiple nodes uniformly

2.2 Remote CodeSmith server

Runs on each managed server.

Responsibilities:

  • expose an OpenRPC API
  • create and manage system users for secure development
  • create and manage isolated workspaces / sandboxes
  • organize code checkout / initialization
  • provide basic lifecycle operations for development environments
  • operate with least privilege where possible

3. Core Design Principles

3.1 SSH-first

No public service exposure is required initially.

All communication happens through:

  • SSH for bootstrap and transport
  • local forwarded socket for API access

3.2 OpenRPC-native

All remote operations are exposed through a clear OpenRPC interface.

This allows:

  • strong typing
  • code generation
  • compatibility with internal tooling
  • later extension to agents and automation

3.3 Secure-by-default

Development happens in isolated contexts.

Initial security model:

  • one or more dedicated users per workspace or task
  • no direct use of root except where unavoidable during setup
  • clear separation between controller identity and sandbox identity
  • filesystem and process isolation boundaries defined early

3.4 Workspace-oriented

The primary unit of work is a workspace.

A workspace contains:

  • code
  • configuration
  • user context
  • sandbox/runtime information
  • metadata needed for AI-assisted development

4. Initial Scope

The first version only needs to support:

4.1 Node preparation

Prepare a target server over SSH so it can run CodeSmith.

Includes:

  • checking OS compatibility
  • installing required dependencies
  • creating required directories
  • installing or updating the CodeSmith server binary/service
  • configuring service startup
  • preparing permissions

4.2 Remote server startup

Ensure the CodeSmith server is running on the node.

Includes:

  • start
  • stop
  • restart
  • health check
  • version check

4.3 Local forwarding

Forward the remote CodeSmith API endpoint to a local socket.

Examples:

  • local Unix socket
  • local localhost TCP port

The controller should maintain a mapping such as:

  • local socket A -> remote node 1
  • local socket B -> remote node 2

4.4 User management

Remote server can:

  • create development users
  • inspect users created by CodeSmith
  • delete or disable development users
  • enforce ownership and permissions for workspaces

4.5 Workspace management

Remote server can:

  • create workspace
  • list workspaces
  • open existing workspace
  • delete workspace
  • assign workspace to a user
  • initialize directory structure

4.6 Sandbox skeleton

Remote server can create a minimal isolated execution context.

At this stage, sandbox may simply mean:

  • dedicated Unix user
  • dedicated workspace directory
  • restricted permissions
  • optional process isolation to be added later

5. Non-Goals for the First Skeleton

Not required yet:

  • full container orchestration
  • Kubernetes integration
  • distributed builds
  • advanced secrets management
  • full policy engine
  • multi-tenant billing/accounting
  • browser IDE
  • package cache optimization
  • full audit/event streaming
  • sophisticated sandbox hardening beyond basic user isolation
  • code intelligence or indexing engine

6. Architecture

6.1 Components

Local Controller

Responsible for:

  • SSH connection management
  • bootstrap/install
  • forwarding
  • OpenRPC client
  • node registry

Remote Agent / Server

Responsible for:

  • executing management actions locally on node
  • filesystem operations
  • user/workspace lifecycle
  • reporting state

Workspace

A directory structure representing an isolated development environment.

Sandbox

Logical isolation boundary attached to a workspace.


7. Basic Flow

7.1 Register / prepare node

  1. Operator provides SSH target and credentials.
  2. Controller connects over SSH.
  3. Controller checks prerequisites.
  4. Controller installs or updates CodeSmith server.
  5. Controller starts server.
  6. Controller establishes local forwarding.
  7. Node becomes addressable as a local OpenRPC endpoint.

7.2 Create workspace

  1. Controller calls remote OpenRPC method.
  2. Remote server creates user if needed.
  3. Remote server creates workspace directory.
  4. Remote server sets ownership and permissions.
  5. Remote server returns workspace metadata.

7.3 Use workspace

Later tools or agents connect through the controller to the node and operate only inside that workspace context.


8. Security Model (Minimal)

8.1 Trust boundaries

  • local controller is trusted by the operator
  • SSH is the trusted transport
  • remote CodeSmith server is trusted only after bootstrap
  • workspaces should not run as root

8.2 Privilege model

  • bootstrap may require root or sudo
  • steady-state operations should run with reduced privileges
  • user/workspace actions should be explicit and auditable

8.3 Isolation baseline

Each workspace should at minimum have:

  • dedicated owner user or dedicated group strategy
  • dedicated directory
  • restricted file permissions
  • optional shell/profile restrictions

9. Minimal Remote API Surface (OpenRPC)

Suggested first methods:

Node / service

  • node.info
  • node.health
  • node.version

User management

  • user.create
  • user.get
  • user.list
  • user.delete

Workspace management

  • workspace.create
  • workspace.get
  • workspace.list
  • workspace.delete

Sandbox / environment

  • sandbox.create
  • sandbox.get
  • sandbox.delete

Code / repository setup

  • `repo.init
use skill /hero_crates_best_practices_check put a readme in each of the folders organize the repo well initial start ``` ./crates/codesmith_ui ./crates/codesmith_lib ./crates/codesmiths_server ./crates/codesmith_ssh ./crates/codesmith ``` put a spec document in each directory (SPECIFICATIONS.md) Here is a **minimal spec** for **CodeSmith**. # CodeSmith — Minimal Specification ## 1. Purpose **CodeSmith** is a remote development orchestration module that prepares and manages secure development environments on remote servers over **SSH**. Its first goal is simple: * connect to remote machines over SSH * install and run a small **CodeSmith server** on each machine * expose that server locally through **SSH forwarding** to a local socket * treat each forwarded local socket as a controllable remote development node * let the node create and manage isolated development users and workspaces This is only the skeleton for further work. --- ## 2. High-Level Concept CodeSmith consists of two parts: ### 2.1 Local controller Runs on the operator/developer machine. Responsibilities: * connect to remote nodes over SSH * bootstrap the remote CodeSmith server * maintain SSH tunnels / port forwards / socket forwards * expose each remote node as a **local endpoint** * talk to the remote server over **OpenRPC** * orchestrate multiple nodes uniformly ### 2.2 Remote CodeSmith server Runs on each managed server. Responsibilities: * expose an **OpenRPC API** * create and manage system users for secure development * create and manage isolated workspaces / sandboxes * organize code checkout / initialization * provide basic lifecycle operations for development environments * operate with least privilege where possible --- ## 3. Core Design Principles ### 3.1 SSH-first No public service exposure is required initially. All communication happens through: * SSH for bootstrap and transport * local forwarded socket for API access ### 3.2 OpenRPC-native All remote operations are exposed through a clear OpenRPC interface. This allows: * strong typing * code generation * compatibility with internal tooling * later extension to agents and automation ### 3.3 Secure-by-default Development happens in isolated contexts. Initial security model: * one or more dedicated users per workspace or task * no direct use of root except where unavoidable during setup * clear separation between controller identity and sandbox identity * filesystem and process isolation boundaries defined early ### 3.4 Workspace-oriented The primary unit of work is a **workspace**. A workspace contains: * code * configuration * user context * sandbox/runtime information * metadata needed for AI-assisted development --- ## 4. Initial Scope The first version only needs to support: ### 4.1 Node preparation Prepare a target server over SSH so it can run CodeSmith. Includes: * checking OS compatibility * installing required dependencies * creating required directories * installing or updating the CodeSmith server binary/service * configuring service startup * preparing permissions ### 4.2 Remote server startup Ensure the CodeSmith server is running on the node. Includes: * start * stop * restart * health check * version check ### 4.3 Local forwarding Forward the remote CodeSmith API endpoint to a local socket. Examples: * local Unix socket * local localhost TCP port The controller should maintain a mapping such as: * local socket A -> remote node 1 * local socket B -> remote node 2 ### 4.4 User management Remote server can: * create development users * inspect users created by CodeSmith * delete or disable development users * enforce ownership and permissions for workspaces ### 4.5 Workspace management Remote server can: * create workspace * list workspaces * open existing workspace * delete workspace * assign workspace to a user * initialize directory structure ### 4.6 Sandbox skeleton Remote server can create a minimal isolated execution context. At this stage, sandbox may simply mean: * dedicated Unix user * dedicated workspace directory * restricted permissions * optional process isolation to be added later --- ## 5. Non-Goals for the First Skeleton Not required yet: * full container orchestration * Kubernetes integration * distributed builds * advanced secrets management * full policy engine * multi-tenant billing/accounting * browser IDE * package cache optimization * full audit/event streaming * sophisticated sandbox hardening beyond basic user isolation * code intelligence or indexing engine --- ## 6. Architecture ## 6.1 Components ### Local Controller Responsible for: * SSH connection management * bootstrap/install * forwarding * OpenRPC client * node registry ### Remote Agent / Server Responsible for: * executing management actions locally on node * filesystem operations * user/workspace lifecycle * reporting state ### Workspace A directory structure representing an isolated development environment. ### Sandbox Logical isolation boundary attached to a workspace. --- ## 7. Basic Flow ### 7.1 Register / prepare node 1. Operator provides SSH target and credentials. 2. Controller connects over SSH. 3. Controller checks prerequisites. 4. Controller installs or updates CodeSmith server. 5. Controller starts server. 6. Controller establishes local forwarding. 7. Node becomes addressable as a local OpenRPC endpoint. ### 7.2 Create workspace 1. Controller calls remote OpenRPC method. 2. Remote server creates user if needed. 3. Remote server creates workspace directory. 4. Remote server sets ownership and permissions. 5. Remote server returns workspace metadata. ### 7.3 Use workspace Later tools or agents connect through the controller to the node and operate only inside that workspace context. --- ## 8. Security Model (Minimal) ### 8.1 Trust boundaries * local controller is trusted by the operator * SSH is the trusted transport * remote CodeSmith server is trusted only after bootstrap * workspaces should not run as root ### 8.2 Privilege model * bootstrap may require root or sudo * steady-state operations should run with reduced privileges * user/workspace actions should be explicit and auditable ### 8.3 Isolation baseline Each workspace should at minimum have: * dedicated owner user or dedicated group strategy * dedicated directory * restricted file permissions * optional shell/profile restrictions --- ## 9. Minimal Remote API Surface (OpenRPC) Suggested first methods: ### Node / service * `node.info` * `node.health` * `node.version` ### User management * `user.create` * `user.get` * `user.list` * `user.delete` ### Workspace management * `workspace.create` * `workspace.get` * `workspace.list` * `workspace.delete` ### Sandbox / environment * `sandbox.create` * `sandbox.get` * `sandbox.delete` ### Code / repository setup * `repo.init
Author
Owner

Implementation Specification: CodeSmith Repository Reorganization

Objective

Reorganize the hero_codesmith repository to follow the Hero crate best practices structure, create the required crate directories with README.md and SPECIFICATIONS.md files, and align the project with the CodeSmith specification for remote development orchestration.

Requirements

  • Create proper crate structure: codesmith_lib, codesmith_ui, codesmith_server, codesmith_ssh, codesmith
  • Add README.md to each crate directory explaining its purpose
  • Add SPECIFICATIONS.md to each crate directory with detailed specs
  • Update root Cargo.toml to use workspace configuration
  • Remove old src/ directory references (already deleted in working tree)
  • Follow Hero naming conventions and architecture patterns
  • Ensure Unix socket-only communication (no TCP)
  • Include OpenRPC spec for the server crate

Files to Create/Modify

Crate Files
Root Cargo.toml (workspace), README.md, buildenv.sh
codesmith_lib Cargo.toml, README.md, SPECIFICATIONS.md
codesmith_server Cargo.toml, README.md, SPECIFICATIONS.md, openrpc.json, src/main.rs
codesmith_sdk Cargo.toml, README.md, SPECIFICATIONS.md, src/lib.rs
codesmith_ui Cargo.toml, README.md, SPECIFICATIONS.md, src/main.rs
codesmith_ssh Cargo.toml, README.md, SPECIFICATIONS.md, src/lib.rs
codesmith (CLI) Cargo.toml, README.md, SPECIFICATIONS.md, src/main.rs
codesmith_examples Cargo.toml, README.md, examples/*.rs

Implementation Plan

Step 1: Update Root Cargo.toml to Workspace Configuration

  • Convert from single package to workspace configuration
  • Add all crate members under crates/
  • Define workspace-level dependencies

Step 2-4: Create codesmith_lib Crate

  • Create Cargo.toml for library crate
  • Create README.md explaining core library purpose
  • Create SPECIFICATIONS.md with module documentation (code/, sessions/, system/, error/)

Step 5-8: Create codesmith_server Crate

  • Create Cargo.toml for server binary
  • Create README.md with OpenRPC methods table
  • Create SPECIFICATIONS.md with API specification
  • Create openrpc.json with full OpenRPC spec (node., user., workspace., sandbox., repo.*)

Step 9-10: Create codesmith_sdk Crate

  • Create Cargo.toml for SDK library
  • Create README.md with usage examples
  • Create SPECIFICATIONS.md with generated types documentation

Step 11-12: Create codesmith_ui Crate

  • Create Cargo.toml for UI binary
  • Create README.md with endpoint documentation
  • Create SPECIFICATIONS.md with proxy pattern and routes

Step 13-14: Create codesmith_ssh Crate

  • Create Cargo.toml for SSH library
  • Create README.md with SSH operations
  • Create SPECIFICATIONS.md with SshConnection types

Step 15-16: Create codesmith CLI Crate

  • Create Cargo.toml for CLI binary
  • Create README.md with command reference
  • Create SPECIFICATIONS.md with CLI structure

Step 17-18: Create codesmith_examples Crate

  • Create Cargo.toml for examples
  • Create README.md with usage instructions
  • Create examples/health.rs and examples/basic_usage.rs

Step 19-20: Update Root Files

  • Update README.md with architecture overview
  • Update buildenv.sh with project name and binaries list

Acceptance Criteria

  • Root Cargo.toml uses workspace configuration
  • All 7 crates have Cargo.toml files
  • All 7 crates have README.md files
  • All 7 crates have SPECIFICATIONS.md files
  • codesmith_server has openrpc.json
  • codesmith_sdk has src/lib.rs with openrpc_client! macro
  • codesmith_ui has src/main.rs with openrpc_proxy! macro
  • codesmith_ssh has src/lib.rs with SshConnection types
  • codesmith has src/main.rs with CLI commands
  • codesmith_examples has examples/health.rs and examples/basic_usage.rs
  • buildenv.sh updated with new project name and binaries
  • cargo check passes for all crates
  • Socket paths follow ~/hero/var/sockets/ convention

Notes

  1. Naming Convention: Crate names use codesmith prefix as per issue requirements
  2. Source Files: Already in crates/codesmith_lib/src/
  3. OpenRPC Dependencies: hero_rpc_derive and herolib_core from herolib repository
  4. Socket Architecture: All services use Unix sockets only

Please review and approve this spec to proceed with implementation.

## Implementation Specification: CodeSmith Repository Reorganization ### Objective Reorganize the hero_codesmith repository to follow the Hero crate best practices structure, create the required crate directories with README.md and SPECIFICATIONS.md files, and align the project with the CodeSmith specification for remote development orchestration. ### Requirements - Create proper crate structure: `codesmith_lib`, `codesmith_ui`, `codesmith_server`, `codesmith_ssh`, `codesmith` - Add README.md to each crate directory explaining its purpose - Add SPECIFICATIONS.md to each crate directory with detailed specs - Update root Cargo.toml to use workspace configuration - Remove old `src/` directory references (already deleted in working tree) - Follow Hero naming conventions and architecture patterns - Ensure Unix socket-only communication (no TCP) - Include OpenRPC spec for the server crate ### Files to Create/Modify | Crate | Files | |-------|-------| | Root | Cargo.toml (workspace), README.md, buildenv.sh | | codesmith_lib | Cargo.toml, README.md, SPECIFICATIONS.md | | codesmith_server | Cargo.toml, README.md, SPECIFICATIONS.md, openrpc.json, src/main.rs | | codesmith_sdk | Cargo.toml, README.md, SPECIFICATIONS.md, src/lib.rs | | codesmith_ui | Cargo.toml, README.md, SPECIFICATIONS.md, src/main.rs | | codesmith_ssh | Cargo.toml, README.md, SPECIFICATIONS.md, src/lib.rs | | codesmith (CLI) | Cargo.toml, README.md, SPECIFICATIONS.md, src/main.rs | | codesmith_examples | Cargo.toml, README.md, examples/*.rs | ### Implementation Plan #### Step 1: Update Root Cargo.toml to Workspace Configuration - Convert from single package to workspace configuration - Add all crate members under `crates/` - Define workspace-level dependencies #### Step 2-4: Create codesmith_lib Crate - Create Cargo.toml for library crate - Create README.md explaining core library purpose - Create SPECIFICATIONS.md with module documentation (code/, sessions/, system/, error/) #### Step 5-8: Create codesmith_server Crate - Create Cargo.toml for server binary - Create README.md with OpenRPC methods table - Create SPECIFICATIONS.md with API specification - Create openrpc.json with full OpenRPC spec (node.*, user.*, workspace.*, sandbox.*, repo.*) #### Step 9-10: Create codesmith_sdk Crate - Create Cargo.toml for SDK library - Create README.md with usage examples - Create SPECIFICATIONS.md with generated types documentation #### Step 11-12: Create codesmith_ui Crate - Create Cargo.toml for UI binary - Create README.md with endpoint documentation - Create SPECIFICATIONS.md with proxy pattern and routes #### Step 13-14: Create codesmith_ssh Crate - Create Cargo.toml for SSH library - Create README.md with SSH operations - Create SPECIFICATIONS.md with SshConnection types #### Step 15-16: Create codesmith CLI Crate - Create Cargo.toml for CLI binary - Create README.md with command reference - Create SPECIFICATIONS.md with CLI structure #### Step 17-18: Create codesmith_examples Crate - Create Cargo.toml for examples - Create README.md with usage instructions - Create examples/health.rs and examples/basic_usage.rs #### Step 19-20: Update Root Files - Update README.md with architecture overview - Update buildenv.sh with project name and binaries list ### Acceptance Criteria - [ ] Root Cargo.toml uses workspace configuration - [ ] All 7 crates have Cargo.toml files - [ ] All 7 crates have README.md files - [ ] All 7 crates have SPECIFICATIONS.md files - [ ] codesmith_server has openrpc.json - [ ] codesmith_sdk has src/lib.rs with openrpc_client! macro - [ ] codesmith_ui has src/main.rs with openrpc_proxy! macro - [ ] codesmith_ssh has src/lib.rs with SshConnection types - [ ] codesmith has src/main.rs with CLI commands - [ ] codesmith_examples has examples/health.rs and examples/basic_usage.rs - [ ] buildenv.sh updated with new project name and binaries - [ ] `cargo check` passes for all crates - [ ] Socket paths follow `~/hero/var/sockets/` convention ### Notes 1. **Naming Convention**: Crate names use `codesmith` prefix as per issue requirements 2. **Source Files**: Already in `crates/codesmith_lib/src/` 3. **OpenRPC Dependencies**: `hero_rpc_derive` and `herolib_core` from herolib repository 4. **Socket Architecture**: All services use Unix sockets only --- **Please review and approve this spec to proceed with implementation.**
Author
Owner

Test Results

  • Total: 18
  • Passed: 18
  • Failed: 0

Summary

All tests pass successfully.

codesmith_lib

  • code::git::tests::test_get_current_branch -
  • code::git::tests::test_get_remote_url -
  • code::git::tests::test_has_uncommitted_changes -
  • code::reorganize::tests::test_analyze_repos -
  • code::reorganize::tests::test_extract_repo_info -
  • code::scanner::tests::test_find_git_repos -
  • error::tests::test_dev_mgr_error_display -
  • sessions::changes::tests::test_get_changes_summary -
  • sessions::crud::tests::test_create_session -
  • sessions::crud::tests::test_delete_session -
  • sessions::crud::tests::test_list_sessions -
  • sessions::snapshot::tests::test_create_snapshot -
  • sessions::snapshot::tests::test_list_snapshots -
  • system::btrfs::tests::test_create_subvolume -
  • system::checks::tests::test_verify_system -
  • system::users::tests::test_get_username -
  • system::users::tests::test_parse_id_output -
  • system::users::tests::test_validate_name -

Other crates

  • codesmith_sdk: 0 tests (skeleton)
  • codesmith_server: 0 tests (skeleton)
  • codesmith_ssh: 0 tests (skeleton)
  • codesmith_ui: 0 tests (skeleton)
  • codesmith: 0 tests (skeleton)
  • codesmith_examples: 4 integration tests (ignored, require running server)
## Test Results - **Total:** 18 - **Passed:** 18 - **Failed:** 0 ### Summary All tests pass successfully. #### codesmith_lib - `code::git::tests::test_get_current_branch` - ✅ - `code::git::tests::test_get_remote_url` - ✅ - `code::git::tests::test_has_uncommitted_changes` - ✅ - `code::reorganize::tests::test_analyze_repos` - ✅ - `code::reorganize::tests::test_extract_repo_info` - ✅ - `code::scanner::tests::test_find_git_repos` - ✅ - `error::tests::test_dev_mgr_error_display` - ✅ - `sessions::changes::tests::test_get_changes_summary` - ✅ - `sessions::crud::tests::test_create_session` - ✅ - `sessions::crud::tests::test_delete_session` - ✅ - `sessions::crud::tests::test_list_sessions` - ✅ - `sessions::snapshot::tests::test_create_snapshot` - ✅ - `sessions::snapshot::tests::test_list_snapshots` - ✅ - `system::btrfs::tests::test_create_subvolume` - ✅ - `system::checks::tests::test_verify_system` - ✅ - `system::users::tests::test_get_username` - ✅ - `system::users::tests::test_parse_id_output` - ✅ - `system::users::tests::test_validate_name` - ✅ #### Other crates - codesmith_sdk: 0 tests (skeleton) - codesmith_server: 0 tests (skeleton) - codesmith_ssh: 0 tests (skeleton) - codesmith_ui: 0 tests (skeleton) - codesmith: 0 tests (skeleton) - codesmith_examples: 4 integration tests (ignored, require running server)
Author
Owner

Implementation Complete

Summary

The CodeSmith repository has been reorganized to follow the Hero crate best practices structure.

Changes Made

Root Level

  • Cargo.toml - Converted to workspace configuration with 7 crate members
  • README.md - Updated with new architecture and crate documentation
  • buildenv.sh - Updated with new project name and binaries list

New Crates Created

Crate Files Created
codesmith_lib Cargo.toml, README.md, SPECIFICATIONS.md
codesmith_server Cargo.toml, README.md, SPECIFICATIONS.md, openrpc.json, src/main.rs
codesmith_sdk Cargo.toml, README.md, SPECIFICATIONS.md, src/lib.rs
codesmith_ui Cargo.toml, README.md, SPECIFICATIONS.md, src/main.rs
codesmith_ssh Cargo.toml, README.md, SPECIFICATIONS.md, src/lib.rs
codesmith Cargo.toml, README.md, SPECIFICATIONS.md, src/main.rs
codesmith_examples Cargo.toml, README.md, examples/health.rs, examples/basic_usage.rs, tests/integration.rs

Files Modified

  • crates/codesmith_lib/src/lib.rs - Removed tui module reference, updated crate docs
  • Deleted crates/codesmith_lib/src/main.rs - Moved to separate CLI crate

Build Status

  • cargo check passes
  • cargo test passes (18 tests)

Socket Convention

All services use Unix sockets at ~/hero/var/sockets/:

  • Server: codesmith_server.sock
  • UI: codesmith_ui.sock

OpenRPC API

The server exposes 16 OpenRPC methods:

  • rpc.discover, rpc.health
  • node.info, node.version
  • user.create, user.get, user.list, user.delete
  • workspace.create, workspace.get, workspace.list, workspace.delete
  • sandbox.create, sandbox.get, sandbox.delete
  • repo.init

Next Steps

  1. Implement actual Unix socket communication in SDK
  2. Implement OpenRPC handlers in server
  3. Add TUI module to codesmith_lib
  4. Complete integration tests
## Implementation Complete ### Summary The CodeSmith repository has been reorganized to follow the Hero crate best practices structure. ### Changes Made #### Root Level - `Cargo.toml` - Converted to workspace configuration with 7 crate members - `README.md` - Updated with new architecture and crate documentation - `buildenv.sh` - Updated with new project name and binaries list #### New Crates Created | Crate | Files Created | |-------|---------------| | `codesmith_lib` | Cargo.toml, README.md, SPECIFICATIONS.md | | `codesmith_server` | Cargo.toml, README.md, SPECIFICATIONS.md, openrpc.json, src/main.rs | | `codesmith_sdk` | Cargo.toml, README.md, SPECIFICATIONS.md, src/lib.rs | | `codesmith_ui` | Cargo.toml, README.md, SPECIFICATIONS.md, src/main.rs | | `codesmith_ssh` | Cargo.toml, README.md, SPECIFICATIONS.md, src/lib.rs | | `codesmith` | Cargo.toml, README.md, SPECIFICATIONS.md, src/main.rs | | `codesmith_examples` | Cargo.toml, README.md, examples/health.rs, examples/basic_usage.rs, tests/integration.rs | #### Files Modified - `crates/codesmith_lib/src/lib.rs` - Removed `tui` module reference, updated crate docs - Deleted `crates/codesmith_lib/src/main.rs` - Moved to separate CLI crate ### Build Status - ✅ `cargo check` passes - ✅ `cargo test` passes (18 tests) ### Socket Convention All services use Unix sockets at `~/hero/var/sockets/`: - Server: `codesmith_server.sock` - UI: `codesmith_ui.sock` ### OpenRPC API The server exposes 16 OpenRPC methods: - `rpc.discover`, `rpc.health` - `node.info`, `node.version` - `user.create`, `user.get`, `user.list`, `user.delete` - `workspace.create`, `workspace.get`, `workspace.list`, `workspace.delete` - `sandbox.create`, `sandbox.get`, `sandbox.delete` - `repo.init` ### Next Steps 1. Implement actual Unix socket communication in SDK 2. Implement OpenRPC handlers in server 3. Add TUI module to codesmith_lib 4. Complete integration tests
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_code/hero_codesmith#2
No description provided.