Compare commits
3 changed files with 2 additions and 34 deletions
|
|
@ -15,6 +15,6 @@ Claude session (OAuth credentials) lives at `/root/.claude/` and persists across
|
||||||
|
|
||||||
**Shared space**: `/shared` is accessible to all agents (read/write). Only put things here you're willing to lose — other agents may delete them. Use for explicit cross-agent communication or shared artifacts when appropriate.
|
**Shared space**: `/shared` is accessible to all agents (read/write). Only put things here you're willing to lose — other agents may delete them. Use for explicit cross-agent communication or shared artifacts when appropriate.
|
||||||
|
|
||||||
Keep messages short — a few sentences each. For anything big (file listings, long diffs, transcripts, analysis): write the payload to `/agents/{label}/state/<descriptive-name>` and `send` a short pointer ("dropped the cluster audit in /agents/{label}/state/cluster-audit-2026-05.md, headline: 3 nodes over 80% mem"). The manager + operator can read your state from the host as `/agents/{label}/state/`. Sub-agent peers can't read each other's state directly — go through the manager if a payload needs to reach another sub-agent.
|
Keep messages short — a few sentences each. For anything big (file listings, long diffs, transcripts, analysis): write the payload to `/agents/{label}/state/<descriptive-name>` and `send` a short pointer ("dropped the cluster audit in /state/cluster-audit-2026-05.md, headline: 3 nodes over 80% mem"). The manager + operator can read your state from the host as `/agents/{label}/state/`. Sub-agent peers can't read each other's `/state/` directly — go through the manager if a payload needs to reach another sub-agent.
|
||||||
|
|
||||||
When your inbox has a message, handle it and stop. Don't narrate intent — act.
|
When your inbox has a message, handle it and stop. Don't narrate intent — act.
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,7 @@ Durable knowledge:
|
||||||
|
|
||||||
Keep messages short — a few sentences each. For anything big (digests, agent rosters, plans, transcripts) write the payload to a file and `send` a short pointer:
|
Keep messages short — a few sentences each. For anything big (digests, agent rosters, plans, transcripts) write the payload to a file and `send` a short pointer:
|
||||||
|
|
||||||
- To a sub-agent X: write to `/agents/X/state/<descriptive-name>` and tell them "see /agents/X/state/<descriptive-name>".
|
- To a sub-agent X: write to `/agents/X/state/<descriptive-name>` and tell them "see /state/<descriptive-name>".
|
||||||
- To the operator: write to your own `/state/<descriptive-name>` (host path `/var/lib/hyperhive/agents/hm1nd/state/`) and tell them where to look.
|
- To the operator: write to your own `/state/<descriptive-name>` (host path `/var/lib/hyperhive/agents/hm1nd/state/`) and tell them where to look.
|
||||||
- For shared artifacts (coordination, common reference data): write to `/shared/<descriptive-name>`. Only put things here you're willing to lose — other agents may delete them.
|
- For shared artifacts (coordination, common reference data): write to `/shared/<descriptive-name>`. Only put things here you're willing to lose — other agents may delete them.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,10 +6,6 @@
|
||||||
//! is expected to be idempotent so reinstalling on each container
|
//! is expected to be idempotent so reinstalling on each container
|
||||||
//! recreate is fine. Failures log a warning but do not abort boot —
|
//! recreate is fine. Failures log a warning but do not abort boot —
|
||||||
//! we'd rather start without a plugin than refuse to serve.
|
//! we'd rather start without a plugin than refuse to serve.
|
||||||
//!
|
|
||||||
//! Before installing, all configured marketplaces are updated so that
|
|
||||||
//! plugin specs resolve against current index data. Marketplace update
|
|
||||||
//! failures are non-fatal — stale index is better than no install attempt.
|
|
||||||
|
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
|
|
||||||
|
|
@ -19,30 +15,6 @@ use crate::client;
|
||||||
|
|
||||||
const PLUGINS_PATH: &str = "/etc/hyperhive/claude-plugins.json";
|
const PLUGINS_PATH: &str = "/etc/hyperhive/claude-plugins.json";
|
||||||
|
|
||||||
/// Update all configured plugin marketplaces. Non-fatal — logs a warning
|
|
||||||
/// on failure but does not abort the install sequence.
|
|
||||||
async fn update_marketplaces() {
|
|
||||||
match Command::new("claude")
|
|
||||||
.args(["plugin", "marketplace", "update"])
|
|
||||||
.output()
|
|
||||||
.await
|
|
||||||
{
|
|
||||||
Ok(out) if out.status.success() => {
|
|
||||||
tracing::info!("claude plugin marketplace update ok");
|
|
||||||
}
|
|
||||||
Ok(out) => {
|
|
||||||
tracing::warn!(
|
|
||||||
status = ?out.status,
|
|
||||||
stderr = %String::from_utf8_lossy(&out.stderr),
|
|
||||||
"claude plugin marketplace update failed (non-fatal)",
|
|
||||||
);
|
|
||||||
}
|
|
||||||
Err(e) => {
|
|
||||||
tracing::warn!(error = ?e, "claude plugin marketplace update spawn failed (non-fatal)");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Install every plugin in `/etc/hyperhive/claude-plugins.json`. When
|
/// Install every plugin in `/etc/hyperhive/claude-plugins.json`. When
|
||||||
/// `notify_recipient` is `Some(name)`, install failures also get sent
|
/// `notify_recipient` is `Some(name)`, install failures also get sent
|
||||||
/// as a hyperhive message to that recipient (typically `"manager"` for
|
/// as a hyperhive message to that recipient (typically `"manager"` for
|
||||||
|
|
@ -61,10 +33,6 @@ pub async fn install_configured(socket: &Path, notify_recipient: Option<&str>) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
if specs.is_empty() {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
update_marketplaces().await;
|
|
||||||
for spec in specs {
|
for spec in specs {
|
||||||
match Command::new("claude")
|
match Command::new("claude")
|
||||||
.args(["plugin", "install", &spec])
|
.args(["plugin", "install", &spec])
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue