feat(agent): design agent lifecycle model - #105
Merged
Merged
Conversation
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.
Closes #25
Description
Implement the agent definition/instance split: definitions (
agents) are persistent config with a definition-levelactive|pausedgate, amodel_bindingandassignments; instances (agent_instances) are ephemeral rows binding one definition to one session, existing only while they can take turns — hard-deleted on destroy, carrying no context (the session transcript and the vault own all context).Implementation
octave.db.types:AgentStatus,InstanceStatus,TagModelBinding/ExplicitModelBinding/ModelBinding(discriminated union),AgentAssignmentsagentsrework:model_bindingJSON replacesmodel_tag(data migration copies old tags into tag-form bindings), newassignmentsJSONagent_instancestable: unique agent×session binding, RESTRICT on definition delete, CASCADE on session delete,idledefaultupgrade(sync_url, revision=)supports seeding at older schema revisions (pins themodel_tagdata migration in tests)AgentInstanceManager(octave.agent.instances) — single write path, VaultStore convention (caller-suppliedAsyncSession, never commits):spawn: gates on paused definitions, terminal sessions, duplicates, missing/malformed bindings; ensures Participant + membership (re-invite resetsleft_at)begin_turn/end_turn: atomic idle→active turn mutex; pause re-check at turn startdestroy: plain delete (archival decoupled to the turn boundary);reconcile: resets stale active rows after unclean shutdownresolve_model: fail-loud binding resolution with injectedtag_lookup(tag→model lookup lands with Inference feat(ui): create responsive layout components and shared UI library #7)octave.agent; SDK quarantine (noopenai/mcpimports) intactReferences
.agents/specs/2026-09-27-agent-lifecycle-model-design.md.agents/specs/2026-09-27-agent-lifecycle-model.mdChecklist