Package net.thevpc.naru.api.agent
Interface NaruAgent
public interface NaruAgent
-
Method Summary
Modifier and TypeMethodDescriptiondirectiveFilter(Predicate<NaruDirective> directiveFilter) env()voidlog(NaruLogMode mode, NMsg message) Agent-level output: the startup banner and failures of the agent's own maintenance loop.Begins configuring a new session.projectDirectory(NPath projectDirectory) Looks up a running session by its id.sessions()The sessions currently running under this agent.tagFilter(Predicate<NaruToolTag> tagFilter) toolFilter(Predicate<NaruTool> toolFilter)
-
Method Details
-
directiveFilter
Predicate<NaruDirective> directiveFilter() -
directiveFilter
-
toolFilter
-
toolFilter
-
tagFilter
Predicate<NaruToolTag> tagFilter() -
tagFilter
-
projectDirectory
NPath projectDirectory() -
projectDirectory
-
newSession
NaruSessionBuilder newSession()Begins configuring a new session. Nothing is created or started untilNaruSessionBuilder.build()is called, so the caller chooses both the configuration and the moment work begins.NaruSession s = agent.newSession().interactive().task(spec).build(); s.start(); -
sessions
List<NaruSession> sessions()The sessions currently running under this agent.A live view, not a snapshot: a session appears when it starts and disappears when it stops. A server hosting many sessions uses this to find one by id.
-
session
Looks up a running session by its id.- Returns:
- the session, or null if no running session has that id
-
log
Agent-level output: the startup banner and failures of the agent's own maintenance loop. Session output goes through the session'sNaruInteractioninstead, so that concurrent sessions stay distinguishable. -
env
NaruEnv env()
-