Skip to content

need-singularity/resource

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ”— resource

Standalone host-pool resource SSOT β€” owns the .resource DSL format, the parser, the roster CRUD CLI, the lint/audit/selftest plumbing, and (in progress) the hexa:// URL scheme infrastructure.

.resource is the registry of reachable targets; hexa:// is the URL transport that invokes against that registry. Both live here so the two evolve together.

Install

hx install resource

(Short form resolves via the default probe orgs β€” need-singularity is in hx orgs. Use hx install need-singularity/resource if your HX_ORGS is overridden to exclude it.)

Usage

resource list                  # show host pool (reachable + load + mem + nexus)
resource status [host]         # detailed health (ssh + nexus + claude + slots)
resource add <host>            # probe + bootstrap disclosure
resource remove <host>         # unregister
resource fix <host>            # nexus shim auto-repair + claude bin probe
resource oauth-status <host>   # per-slot OAuth health
resource oauth-reset <host>    # slot-pool reset disclosure
resource sync <host> --tool <path>   # rsync local Mac canonical β†’ host
resource patch <host> --tool <path> --content-b64 <b64>   # ssh + base64 heredoc
resource exec <host> --command "<cmd>" --c3 "<rationale>" # cross-host exec
resource bootstrap <host>      # zero-touch bootstrap (delegates to RM4)
resource log [tail-n]          # tail audit ledger
resource --selftest            # canonical-form sanity (no host I/O)

Universal kind registry (operates on $HIVE/spec/sync_registry.spec.yaml):

resource list <kind>           # dump rows for a kind
resource list kinds            # enumerate registered kinds
resource add <kind> <name> [k=v ...]    # register a row
resource remove <kind> <name>  # delete a row
resource verify [<kind>]       # child-exec each handler with --verify
resource apply  [<kind>]       # child-exec each handler with --apply

Configuration

After install, edit ~/.hx/packages/resource/.resource to declare your host inventory. Replace the example blocks with actual SSH aliases, remote homes, capabilities, and scoring weights. Keep the resource state deferred until the entry is ready to participate in pool routing, then flip to live.

Path resolution

The shim self-locates the package root via $0 (POSIX-portable symlink walk), so it works for any user installing via hx install regardless of $HOME path layout.

Resolution priority:

  1. $RESOURCE_ROOT env var (explicit override)
  2. self-located via $0 β€” resolves to ~/.hx/packages/resource on hx install

Boundary with hive

This repo owns .resource format + parser + CLI + scorer/LB libraries + (in progress) hexa:// URL scheme. Hive (~/core/hive) keeps the runtime decisions on top: nexus-kick orchestration, zero-touch bootstrap chain, TS bridge, hexa://sync/* and hexa://gate/* verb bodies. See doc/boundary.md for the full contract.

Dependencies

  • hexa interpreter (~/.hx/bin/hexa) β€” install via hx install hexa.

License

MIT.

About

πŸ”— resource β€” Standalone host-pool resource SSOT. .resource DSL format + parser + roster CRUD CLI + scorer/LB libraries + hexa:// URL scheme infrastructure (registration via .app trampoline, dispatch core, audit). Cross-host portable, hexa-only deps.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors