Migrate all agents to new contract (closes KI-7 — all 8 issues resolved)#6
Merged
Conversation
- run(target, context) instead of run(input_data) — target is an explicit arg, not pulled from self.session - self.kb.set(key, value, agent=...) instead of writing to the non-existent self.session.knowledge_base dict - add_finding(severity=, title=, ...) called with keyword args directly instead of constructing a Finding object (matches day-3 API) - AGENT_NAME / ROLE set explicitly Refs: STANDOFF.md day 6/30
…on.kb type
IntelAgent:
- run(target, context) instead of run(input_data)
- self.kb instead of self.session.knowledge_base
- self._log(msg) instead of self.log('intel', msg) (wrong arg order)
- IntelAgentV2 subclass folded in: scoring is now a built-in _score()
step gated by score_cves=True; IntelAgentV2 kept as a plain alias
ReportAgent:
- run(target, context) signature
- self.kb.set(...) instead of self.session.knowledge_base
- datetime.utcnow() -> datetime.now(timezone.utc)
ScanSession.kb: was a plain dict, now a KnowledgeBase instance. This was
a latent bug — BaseAgent wrapped session.kb in a KnowledgeBase but the
session itself kept a dict, so agent.kb and session.kb diverged.
session.kb is now a real KnowledgeBase from creation; kb_set/kb_get
still work via __setitem__/get.
test_intel_v2.py rewritten to use the real BaseAgent contract (real
IntelAgent + mocked search_cves) instead of hand-built MagicMock agents.
Refs: STANDOFF.md day 6/30
- run(target, context) signature, _log() instead of log() - self.kb.set(key, value, agent=...) for KB writes - KI-7: self.llm.chat(messages=, system=) replaced with the real LLMClient method self.llm.call(messages=, system=) - AI analysis extracted into _ai_analysis(); gracefully skipped when self.llm is None (e.g. dry-run) instead of crashing on a None call - reads ranked CVEs from both kb['intel']['ranked_cves'] and the dedicated kb['intel.ranked_cves'] key written by IntelAgent._score - ExploitAgentOOB updated to use _log() This is the last of the 8 known issues — KI-7 closed. Refs: STANDOFF.md day 6/30, closes KI-7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.