v0.12.0: continue session subcommand#33
Merged
Merged
Conversation
Adds `deepdive continue <id> [<refined-question>]` — runs a full agent loop (plan + search + fetch) seeded with a saved session's sources. Unlike `resume` (cheap re-synth, no fetches), `continue` lets the planner expand the corpus with a tighter question. URLs from the parent session are deduped against fresh search results so paid-for fetches aren't repeated. - AgentConfig.preKept?: SourceWithContent[] — seeds the kept-sources pool after include[] (so local files still take precedence) and before search. URLs added to seenUrls so the fetch loop skips them. Reassigns sequential ids so the synth packet stays well-formed. - SessionRecord.parentId?: string — backlink to the parent session. Additive: pre-v0.12.0 records load with parentId === undefined. Written only when set so the on-disk shape is preserved for runs that don't use continue. - src/cli.ts: continue joins SUBCOMMAND_VERBS. main()'s research path factored into a shared runResearch() helper used by both the default invocation and the new continueCommand. persistSession threads parentId. USAGE text expanded. +6 tests across sessions / agent-loop / parse-args. 423/423 green.
…ositive
js/incomplete-url-substring-sanitization fired on tracker.fetched.includes("https://ex.com/saved") — the rule is about URL parsing, but here we're matching a literal string in an in-memory test tracker array. The deepEqual on the very next line already proves both that the saved URL was skipped AND that the new URL was the only fetch, so the includes call was redundant in any case.
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.
Summary
Adds
deepdive continue <id> [<refined-question>]— a new subcommand that runs the full agent loop (plan + search + fetch + synthesize) seeded with a saved session's sources. Unlikeresume(which just re-synthesizes against the saved corpus — cheap, no fetches),continuelets the planner expand the corpus with a tighter question while keeping the parent's sources in the pool.AgentConfig.preKept?: SourceWithContent[]— saved sources are placed in the kept-sources pool afterinclude[](so local files still take precedence) and before search. Their URLs are added toseenUrlsso the fetch loop won't re-fetch what the parent already paid for. Ids are reassigned sequentially so the synth packet stays well-formed.SessionRecord.parentId?: string— backlink to the parent session. Additive: pre-v0.12.0 records load withparentId === undefined. Written only when set so the on-disk shape is preserved for runs that don't use continue.src/cli.ts—continuejoinsSUBCOMMAND_VERBS.main()'s research path factored into a sharedrunResearch({question, parsed, config, preKept?, parentId?})helper used by both the default invocation and the newcontinueCommand.persistSessionthreadsparentId. USAGE text expanded.Why a minor bump
New CLI subcommand (
continue), new library surface (preKept?onAgentConfig,parentId?onSessionRecord), new on-disk session-record field. Purely additive —resume,show, and the default research path are byte-identical to v0.11.0 for runs that don't usecontinue.Test plan
npm run typecheckcleannpm test— 423/423 green (417 prior + 6 new)parentIdround-trips through save/loadparentId === undefinedpreKeptseeds appear alongside fresh-fetched sources with reassigned sequential idspreKeptURLs dedupe against fresh search results — saved URLs never re-fetchedcontinue <id>andcontinue <id> <refined-question>both parse correctlyparentIdset