Skip to content

Add queryable history, hidden compaction, and runtime observation#8

Merged
timazed merged 19 commits intomainfrom
feature/history-apis
Mar 24, 2026
Merged

Add queryable history, hidden compaction, and runtime observation#8
timazed merged 19 commits intomainfrom
feature/history-apis

Conversation

@timazed
Copy link
Owner

@timazed timazed commented Mar 23, 2026

Summary

  • add query-first runtime persistence with GRDB-backed storage, paged history inspection, lightweight thread/context reads, and whole-thread deletion/redaction support
  • externalize persisted image attachments into sidecar files so runtime history stays small and restore/paging performance does not degrade with image-heavy threads
  • add hidden effective-context compaction that preserves canonical user-visible history while compacting only the runtime prompt working set
  • add first-class runtime context-usage projection APIs (fetchThreadContextUsage, observeThreadContextUsage, and AgentThreadContextUsage) so hosts can inspect token pressure without rebuilding those estimates in app code
  • improve messaging behavior so streamMessage(...) returns immediately, commits the local user message before backend startup finishes, and sendMessage(...) can be paired with live observation cleanly
  • add Combine-based runtime observation APIs (observeThreads, observeThread, observeMessages, observeThreadSummary, observeThreadContextState, observeThreadContextUsage) plus setTitle(_:for:)
  • update the demo app to exercise compaction, token-based context usage, observation, and thread renaming, and refresh the README/docs to match the new feature set

Testing

  • swift build
  • swift test
  • xcodebuild -project DemoApp/AssistantRuntimeDemoApp.xcodeproj -scheme AssistantRuntimeDemoApp -sdk iphonesimulator -destination 'generic/platform=iOS Simulator' CODE_SIGNING_ALLOWED=NO build

@timazed timazed changed the title Add queryable runtime persistence and attachment externalization Add queryable persistence, hidden compaction, and runtime observation Mar 24, 2026
@timazed timazed changed the title Add queryable persistence, hidden compaction, and runtime observation Add queryable history, hidden compaction, and runtime observation Mar 24, 2026
@timazed timazed merged commit e5ac6f6 into main Mar 24, 2026
1 check passed
@timazed timazed deleted the feature/history-apis branch March 24, 2026 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant