Skip to content

feat(agents): c0mpute agent with sub-agents and /agents, Claude Code UX - #595

Merged
ralyodio merged 2 commits into
mainfrom
feat/c0mpute-agents
Nov 7, 2026
Merged

ralyodio merged 2 commits into
mainfrom
feat/c0mpute-agents

Conversation

@ralyodio

@ralyodio ralyodio commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

moshcode agents c0mpute (and /agents c0mpute in the pit) opens a coding agent whose model runs on the c0mpute peer network, with the same UX as Claude Code, sub-agents included.

c0mpute has no coding CLI, so moshcode is the harness: the loop runs locally, model calls go through @profullstack/ai-providers' C0mputeProvider (Infernet job + SSE, house-model fallback, ik_live_ billing).

What you get

  • Agent loop + tools: read, write, edit, bash, glob, grep, ls, todo, and task (sub-agents). Infernet ignores the API tools field, so calls are a text protocol (<tool name="read">{"path": "…"}</tool>) parsed leniently: attributes, bare strings, fenced JSON, a reply that is only the args object, unclosed blocks, stray }}.
  • Sub-agents: task hands a self-contained job to an agent with a fresh conversation, its own prompt and tool list; several task calls in one reply run in parallel; sub-agents can't spawn sub-agents. Built-ins: general-purpose, explore, plan.
  • /agents: list (grouped project / user / Claude Code / built-in, shows overrides), new (drafted by c0mpute or by hand), show, edit ($EDITOR; built-ins copy to the project first), rm, run. @agent <task> runs one directly.
  • Definitions are Claude Code-compatible markdown + frontmatter in .moshcode/agents and ~/.moshcode/agents; existing .claude/agents load read-only with tool/model names mapped.
  • Permissions: edits and non-read-only commands ask (y / always / n / type an instruction). Shift-tab cycles ask → accept edits → plan. -y bypasses. Read-only shell (ls, cat, git status/diff/log, rg) never asks.
  • REPL: streaming text with thinking + tool blocks hidden, ● Read(…) / ⎿ lines, spinner, esc/^C interrupt, /model /models /todos /compact /clear /cost /key /cwd. Print mode with -p (or stdin). -C <dir>.
  • Context kept small for 9B models: tool output capped, oldest tool results elided first; real top-level file listing in the prompt.

Verified

  • 19 unit tests (test/c0agent.test.mjs) with a scripted provider: parser incl. the exact malformed output qwen3.5 9B produced live, stream filter, every tool, permission gating, parallel sub-agents (peak concurrency 2), definition priority/shadowing, config 0600.
  • REPL driven in a real pty: banner, /help, /agents, /agents show, /agents new --manual wizard → saved + listed, plan-mode badge.
  • Live on c0mpute (huihui_ai/qwen3.5-abliterated:9b, fleet key): "npm test fails. Find the bug, fix it, and run the tests" → read test.js + math.js, edited a - b → a + b, ran npm test (exit 0), reported. Two earlier live runs failed; their raw output drove the parser/edit fixes in the second commit.
  • Full suite: 3078 pass, 3 fail, all pre-existing and outside this diff (apps/pwa coinpay-checkout deps, ring footer network, dns parking server).

Privacy: prompts and tool output go to the peer node that takes each job; the banner and README say so.

🤖 Generated with Claude Code

ralyodio and others added 2 commits November 7, 2026 16:09
moshcode agents c0mpute (and /agents c0mpute in the pit) opens a coding
agent whose model runs on the c0mpute peer network. moshcode is the harness:
text tool protocol (Infernet ignores tools), read/write/edit/bash/glob/grep/
ls/todo + task subagents in parallel, permission prompts with shift-tab
modes, /agents list/new/show/edit/rm/run, @agent, Claude Code .claude/agents
reused. Print mode with -p.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…, re-indented edits; ground the prompt in real file names

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@socket-security

Copy link
Copy Markdown
Contributor

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​profullstack/​ai-providers@​0.2.07610010093100

View full report

@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown

ThreatCrush Security Scan

8 finding(s) in the 10 file(s) this pull request changes.

MEDIUM: 8

Severity Rule Location
MEDIUM sql-string-concatenation src/cli-schema.mjs:271
MEDIUM sql-string-concatenation src/cli-schema.mjs:386
MEDIUM sql-string-concatenation src/cli-schema.mjs:830
MEDIUM sql-string-concatenation src/cli-schema.mjs:863
MEDIUM sql-string-concatenation src/cli-schema.mjs:970
MEDIUM sql-string-concatenation src/cli-schema.mjs:1333
MEDIUM sql-string-concatenation src/cli-schema.mjs:1870
MEDIUM sql-string-concatenation src/cli-schema.mjs:1888
106 pre-existing finding(s) elsewhere in the repository — **HIGH/CRITICAL**: 8 | **MEDIUM**: 79 | **LOW**: 19

Not introduced by this pull request. The full set is in the Security tab.

Severity Rule Location
HIGH js-ssrf-outbound-request apps/pwa/public/sw.js:76
HIGH tls-verification-disabled apps/pwa/src/lib/moshpit-gateway.mjs:299
HIGH sh-remote-script-execution install.sh:87
HIGH sh-remote-script-execution install.sh:91
HIGH sh-remote-script-execution install.sh:259
HIGH sh-remote-script-execution install.sh:270
HIGH sh-remote-script-execution install.sh:276
HIGH tls-verification-disabled src/dns.mjs:823
MEDIUM js-unescaped-html-sink apps/pwa/public/herd/herd.js:117
MEDIUM sql-template-interpolation apps/pwa/src/lib/moshpit-certs.mjs:44
MEDIUM sql-template-interpolation apps/pwa/src/lib/moshpit-certs.mjs:82
MEDIUM sql-template-interpolation apps/pwa/src/moshpit.mjs:139
MEDIUM sql-template-interpolation apps/pwa/src/moshpit.mjs:153
MEDIUM sql-template-interpolation apps/pwa/src/moshpit.mjs:179
MEDIUM sql-template-interpolation apps/pwa/src/moshpit.mjs:373
MEDIUM sql-template-interpolation apps/pwa/src/moshpit.mjs:377
MEDIUM sql-template-interpolation apps/pwa/src/moshpit.mjs:422
MEDIUM sql-template-interpolation apps/pwa/src/moshpit.mjs:674
MEDIUM sql-template-interpolation apps/pwa/src/moshpit.mjs:870
MEDIUM sql-template-interpolation apps/pwa/src/moshpit.mjs:872

…and 86 more. Full results in the Security tab.

Snippets are redacted; ThreatCrush never prints matched credential material.

@ralyodio
ralyodio merged commit ebe3837 into main Nov 7, 2026
6 checks passed
@ralyodio ralyodio mentioned this pull request Nov 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant