Releases: lloyal-ai/sdk
v1.7.0
What's Changed
- Feat/spine by @lloyal-research in #9
- Refactor/public api by @lloyal-research in #8
Full Changelog: v1.5.8...v1.7.0
v1.5.7
Full Changelog: v1.5.6...v1.5.7
v1.5.1
lloyal-sdk v1.5.1
Breaking Changes
AgentResult.findings → AgentResult.result
The agent's output field is renamed across the framework. All harnesses reading pool results need to update:
// Before
pool.agents[0].findings
// After
pool.agents[0].resultFindingsSource → ResultSource
The provenance type, getter, and setter are renamed:
Agent.reportFindings()→Agent.reportResult()Agent.findingsSource→Agent.resultSource
reportPrompt → extractionPrompt
The pool option for scratchpad extraction is renamed on AgentPoolOptions and SpawnAgentsOpts:
// Before
yield* spawnAgents({ ..., reportPrompt: REPORT });
// After
yield* spawnAgents({ ..., extractionPrompt: REPORT });ReportTool schema: findings → result
The terminal tool's JSON schema parameter is renamed. Models now output {"result": "..."} instead of {"findings": "..."}.
New Features
Entailment Scoring
The reranker (0.6B cross-encoder, own context, zero inference KV cost) now scores texts against the original query during research — preventing thread drift where agents follow lexically similar but semantically irrelevant threads through recursive delegation.
Entailment fires at steering boundaries only:
- Web search results — reranked by entailment before the agent sees them
- Delegation boundary — proposed sub-questions filtered if they don't entail from the original query
Content boundaries (fetch_page chunks, corpus search results) use agent-local scoring only — preserving serendipitous discovery of bridging content that produces hypothesis-driven investigation.
const scorer = source.createScorer(query);
yield* spawnAgents({ tools: source.tools, scorer, ... });Reranker.scoreBatch()
New method for scoring raw text strings without the Chunk abstraction. Tokenizes internally, batches up to nSeqMax prompts per decode.
Source.createScorer() Factory
Sources create immutable EntailmentScorer instances per query. No mutable state on Source — safe across concurrent pools.
interface EntailmentScorer {
scoreEntailmentBatch(texts: string[]): Promise<number[]>;
shouldProceed(score: number): boolean;
}alsoOnPage Discovery Signal
FetchPageTool now returns headings of chunks that didn't make the top-K cutoff — lightweight topic signals (~50 tokens) for hypothesis formation without KV cost.
{
"content": "...top-K relevant chunks...",
"alsoOnPage": ["Unified memory architecture", "Draft model sizing"]
}URL Dedup Cache
BufferingFetchPage caches fetched results per URL. Same URL fetched by multiple agents returns the cached result. Cache cleared on source.bind().
Entailment Trace Events
New trace types for debugging entailment decisions:
entailment:search— scores and ordering before/after rerankingentailment:search:reordered— final result orderentailment:delegate— per-task scores and kept/rejected decisions
Bug Fixes
- BufferingFetchPage context forwarding — now passes
contexttosuper.execute(), fixing broken progress reporting - Reranker
nBatchsizing — set tofloor(nCtx / nSeqMax)instead of default 512, preventingdecode::scatterfailures on long reranker prompts - Sequential
scoreBatchcalls — removedPromise.allthat caused concurrentllama_contextaccess - TUI
agent:reportevent — fixedev.findings→ev.resultcrash inagent-view.ts
Infrastructure
- 85 unit tests via vitest — Agent state machine, AgentPolicy decisions, EntailmentScorer factory, prompt composition, entailment gate logic, architectural boundary discipline
- CI integration —
unit-testsjob in GitHub Actions, runs on every push/PR