mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-12-04 06:21:59 +09:00
* feat(agent): add bounded managed dynamic workflows and verified lifecycle observation * feat(plugins): integrate managed workflows with mod policy and capability discovery * feat(managed): unify console runs and verified advisory learning * fix(managed): hydrate native recall receipts validated on ruOS * docs(managed): record authenticated console host blocker * docs(managed): qualify installed console and compatible native host * feat(managed): integrate verified cycles and isolate native memory * fix(managed): enforce offline native models and qualify feedback E2E * fix(managed): independent security and correctness review findings - gate managed_agent_interrupt through the managed_agent_control policy; terminate obeys the allowlist and deletes only its own environment when RUFLO_MANAGED_CONTROL=1 - track only events from the acknowledged message so a later poll cannot report the previous turn as finished - require the canonical base64 verifier signature so one receipt cannot fill the ledger - register RUFLO_MANAGED_AGENTS_BASE_URL as a trust-boundary env var (env-precedence audit) and key the credential scope marker with a per-process HMAC (CodeQL) - best-effort local snapshot writes; report messageId when a prompt fails after it was sent - console: rescheduling is running, budget/action-blocked sessions are active, not finished - document the remaining known limits in ADR 0004 Co-Authored-By: RuFlo <ruv@ruv.net> * docs: user guide section for managed cloud agents; correct ruflo-agent README counts Co-Authored-By: RuFlo <ruv@ruv.net> * fix(managed): scope marker is a generation number, never a hash of the API key (CodeQL) Co-Authored-By: RuFlo <ruv@ruv.net> --------- Co-authored-by: r <r@x>
32 lines
1.5 KiB
TypeScript
32 lines
1.5 KiB
TypeScript
import { scan } from './screen'
|
|
import type { ModOptions } from './options'
|
|
import type { Stats } from './status'
|
|
|
|
/** `/agent-mod` is answered locally and takes no model turn. */
|
|
export type CommandDeps = { readonly opts: ModOptions; readonly stats: Stats }
|
|
|
|
const HELP = ['/agent-mod status', '/agent-mod scan <text>', '/agent-mod guarded', '/agent-mod capabilities'].join('\n')
|
|
|
|
export function answer(args: string, deps: CommandDeps): string {
|
|
const [verb = '', ...rest] = args.trim().split(/\s+/)
|
|
const arg = rest.join(' ')
|
|
const { opts, stats } = deps
|
|
|
|
if (verb === '' || verb === 'help') return HELP
|
|
|
|
if (verb === 'status') {
|
|
return `guard ${opts.guard ? 'on' : 'off'} · calls guarded ${stats.calls} · blocked ${stats.blocked}\nManaged workflow policy ${opts.managedWorkflows ? 'on' : 'off'}; maximum ${opts.maxBudgetCents} US cents; inline ${opts.allowInlineAgents ? 'on' : 'off'}`
|
|
}
|
|
|
|
if (verb === 'scan') {
|
|
if (arg === '') return 'usage: /agent-mod scan <text>'
|
|
const found = scan(arg)
|
|
const parts = [found.secrets.length ? `secrets: ${found.secrets.join(', ')}` : '', found.injection.length ? `injection phrasing: ${found.injection.join(', ')}` : ''].filter(Boolean)
|
|
return parts.length ? `The guard would refuse a write of that (${parts.join('; ')}).` : 'Nothing found: the guard would let that through.'
|
|
}
|
|
|
|
if (verb === 'guarded') return 'Guarded tools: wasm_agent_prompt, wasm_agent_tool, wasm_agent_create, wasm_gallery_create, managed_agent_create, managed_agent_prompt.'
|
|
|
|
return `Unknown: ${verb}\n${HELP}`
|
|
}
|