feat(office): unified RPC data plane + selfstart CLI + arch doc #10

Merged
zaelgohary merged 1 commit from development_feat_office_unified_data_plane into development 2026-04-27 08:28:54 +00:00
Member

Summary

Three coordinated changes to make the office stack a single API surface and a self-managed service:

  1. New upload_document and delete_document JSON-RPC methods on hero_office_server so the browser stops talking to hero_foundry directly.
  2. New crates/hero_office/ selfstart CLI with --start / --stop, replacing the hand-transcribed action spec in hero_skills/tools/modules/services/service_office.nu.
  3. New doc/architecture.md covering the component map, data flow, doc_key derivation, on-disk cache, required headers, and standard failure modes.
  • Closes #2 (selfstart CLI)
  • Closes #5 (architecture doc)
  • Fixes #4hero_office_ui and hero_office_server already register with hero_proc; the hero_office_bridge mention in the issue is stale (only a reflog entry on an abandoned branch). The selfstart CLI consolidates registration in Rust.

Changes

  • crates/hero_office/Cargo.toml — new
  • crates/hero_office/src/main.rs — new selfstart CLI (mirrors hero_voice exemplar)
  • crates/hero_office_server/src/lib.rs — two new RPC handlers + dispatch arms
  • crates/hero_office_server/src/socket_dav.rsdelete_file over UDS (404 → idempotent success)
  • crates/hero_office_server/openrpc.json — two new method specs
  • Cargo.toml — workspace gains crates/hero_office
  • buildenv.shBINARIES gains hero_office
  • doc/architecture.md — new

Test Results

  • cargo check --workspace
  • cargo test -p hero_office_server -p hero_office
  • cargo clippy -p hero_office_server -p hero_office -- -D warnings
  • cargo fmt --check on touched files

Manual verification

  • hero_office --start on herodev produces the same action specs the nu module produced (verified via hero_proc action list).
  • upload_document / delete_document round-trip end-to-end via curl over the UDS.
  • OnlyOffice editor still opens, edits, and saves through the live stack (verified via tests/e2e/office_editor_real.spec.ts — 4/4 doc types pass).

Known follow-ups

  • Error code -32008 is reused by save_document and upload_document (both hero_foundry write failures). Defensible but distinct codes would be cleaner.
  • Browser-side base64 encoding for upload buffers the entire file — a chunked path would be needed for >50 MB documents. Not a blocker today.
## Summary Three coordinated changes to make the office stack a single API surface and a self-managed service: 1. New `upload_document` and `delete_document` JSON-RPC methods on `hero_office_server` so the browser stops talking to `hero_foundry` directly. 2. New `crates/hero_office/` selfstart CLI with `--start` / `--stop`, replacing the hand-transcribed action spec in `hero_skills/tools/modules/services/service_office.nu`. 3. New `doc/architecture.md` covering the component map, data flow, doc_key derivation, on-disk cache, required headers, and standard failure modes. ## Related Issues - Closes #2 (selfstart CLI) - Closes #5 (architecture doc) - Fixes #4 — `hero_office_ui` and `hero_office_server` already register with `hero_proc`; the `hero_office_bridge` mention in the issue is stale (only a reflog entry on an abandoned branch). The selfstart CLI consolidates registration in Rust. ## Changes - `crates/hero_office/Cargo.toml` — new - `crates/hero_office/src/main.rs` — new selfstart CLI (mirrors hero_voice exemplar) - `crates/hero_office_server/src/lib.rs` — two new RPC handlers + dispatch arms - `crates/hero_office_server/src/socket_dav.rs` — `delete_file` over UDS (404 → idempotent success) - `crates/hero_office_server/openrpc.json` — two new method specs - `Cargo.toml` — workspace gains `crates/hero_office` - `buildenv.sh` — `BINARIES` gains `hero_office` - `doc/architecture.md` — new ## Test Results - `cargo check --workspace` ✅ - `cargo test -p hero_office_server -p hero_office` ✅ - `cargo clippy -p hero_office_server -p hero_office -- -D warnings` ✅ - `cargo fmt --check` on touched files ✅ ## Manual verification - `hero_office --start` on herodev produces the same action specs the nu module produced (verified via `hero_proc action list`). - `upload_document` / `delete_document` round-trip end-to-end via curl over the UDS. - OnlyOffice editor still opens, edits, and saves through the live stack (verified via `tests/e2e/office_editor_real.spec.ts` — 4/4 doc types pass). ## Known follow-ups - Error code `-32008` is reused by `save_document` and `upload_document` (both hero_foundry write failures). Defensible but distinct codes would be cleaner. - Browser-side base64 encoding for upload buffers the entire file — a chunked path would be needed for >50 MB documents. Not a blocker today.
- hero_office_server: add upload_document and delete_document JSON-RPC methods
- socket_dav: add delete_file (404 = idempotent success)
- new crates/hero_office: selfstart CLI with --start/--stop, mirroring
  the spec previously hand-transcribed in hero_skills service_office.nu
- doc/architecture.md: component map, doc_key, cache, failure modes,
  lifecycle, version-bump procedure

Closes #2 (selfstart CLI), closes #5 (architecture doc),
fixes #4 (services now hero_proc-managed via the new CLI;
hero_office_bridge confirmed dead code, no work needed).
zaelgohary changed title from feat(office): unified RPC data plane + selfstart CLI + arch doc to WIP: feat(office): unified RPC data plane + selfstart CLI + arch doc 2026-04-26 15:22:36 +00:00
zaelgohary changed title from WIP: feat(office): unified RPC data plane + selfstart CLI + arch doc to feat(office): unified RPC data plane + selfstart CLI + arch doc 2026-04-27 07:38:11 +00:00
zaelgohary merged commit 865946e957 into development 2026-04-27 08:28:54 +00:00
zaelgohary deleted branch development_feat_office_unified_data_plane 2026-04-27 08:28:54 +00:00
Sign in to join this conversation.
No reviewers
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_office!10
No description provided.