Agents#148
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
| user_id UUID NOT NULL REFERENCES users(uuid) ON DELETE CASCADE, | ||
|
|
||
| label TEXT NOT NULL, | ||
| description TEXT, |
There was a problem hiding this comment.
I don't think we need to persist description here. Probably best it is hardcoded into the code in case we need to configure this later
| label TEXT NOT NULL, | ||
| description TEXT, | ||
| value_enc BYTEA NOT NULL, | ||
| char_limit INTEGER NOT NULL DEFAULT 5000, |
There was a problem hiding this comment.
do we need to enforce char_limit at the db layer or allow it to be configured? another case for this just being hard coded.
| conversation_id BIGINT REFERENCES conversations(id) ON DELETE SET NULL, | ||
|
|
||
| enabled BOOLEAN NOT NULL DEFAULT FALSE, | ||
| model TEXT NOT NULL DEFAULT 'kimi-k2-5', |
There was a problem hiding this comment.
remove kimi default from sql layer, we should always pass this in
|
Latest status after a full review of the branch diff against ReadinessYes, with caveats for a dev-server deploy. I think the branch is architecturally sound enough for dev and is broadly the right long-term direction. I would not call it prod-ready yet, but I also do not think the core Sage-in-Maple model is likely to be rewritten again. Scope reviewed
Main buckets:
What feels stable / foundationalThese look like the right long-term decisions and likely won't change much:
Main caveats before dev deploy
Bottom lineMy current view is:
If we keep this direction, the next highest-value items look like:
|
|
Pushed the latest backend/docs update in I think the next follow-up work should be:
For the current privacy bar, I do not think the remaining provider-visible routing metadata is a blocker so long as plaintext assistant content never leaves the enclave or gets placed in the provider-visible notification shell. |
9bcd03d to
e12bf7d
Compare
9769859 to
38ae912
Compare
Enables encrypted user embedding storage + cosine search with experimental /v1/rag endpoints for local/dev testing. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Use Sage's 20k default char_limit and reject oversized updates via /v1/agent/memory/blocks/:label. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Restructure agent chat to emit messages per-step via SSE instead of batching all messages into a single JSON response. This mirrors Sage's Signal delivery pattern: messages are sent immediately as produced, persisted synchronously (so the next step sees them in context), and embeddings update async. - Split process_message into prepare() + public step() so the handler drives the loop - Chat handler emits agent.message, agent.done, agent.error SSE events - Persistence moved from runtime to handler (send first, store sync, embed async) - Added ExecutedTool to carry tool results for handler-side persistence - Updated sage-in-maple doc to reflect conversations API isolation done Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Sage uses kimi-k2 as the default model with a 256k context window. The agent config was incorrectly defaulting to deepseek-r1-0528 with 100k context. Fixed in both the runtime code and the migration SQL. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
The get_or_create_agent_config helper in mod.rs still had the old deepseek-r1-0528 / 100k defaults. Extracted DEFAULT_MODEL, DEFAULT_CONTEXT_WINDOW, DEFAULT_COMPACTION_THRESHOLD as pub constants in runtime.rs and use them from both creation sites. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Adds encrypted attachment_text storage and a vision pre-step for input_image so agents and embeddings see [Uploaded Image: ...] descriptions. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Use custom rustPlatform from rust-overlay to match rust-toolchain.toml. Add outputHashes for baml-ids, minijinja, and rig-core git dependencies. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Hide the primary Maple relationship behind a main agent thread while giving users focused subagent chats that share memory and code-owned runtime defaults. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Mirror the conversations API so clients can list agents and browse main-agent and subagent items with consistent cursor semantics. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Allow Sage development flows to fully reset the main agent, its subagents, and shared memory without changing production behavior. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Reflect the Maple AI secure messaging identity across agent prompts, push copy, and migration naming. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Prevent cross-user device reuse from leaking queued notifications, reclaim expired leases, respect deferred sends, and clarify that v1 protects plaintext notification content rather than all provider-visible metadata. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Reuse same-install device bindings across re-registration, add logout cleanup revoke behavior, and document the expected push lifecycle so account switches and reinstalls behave predictably. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Prevent stale workers from overwriting notification delivery results, fold the platform/provider integrity check into the base push migration, and align the push design doc with the shipped backend behavior. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
APNs requires ALPN-negotiated HTTP/2, so the Nitro push path now uses an HTTP/2-only client and exposes the same startup TCP checks as the other outbound push endpoints. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Record the current iOS, macOS, and Android push behavior so the backend design doc reflects the shipped disconnect-triggered v1 scope and the remaining hardening gaps. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Seed onboarding messages during init, return them directly to clients, and persist user locale/timezone so Maple's first-run experience is durable and predictable. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Let Maple schedule future agent turns with recurring rules, timezone-aware execution, and normal agent.message push delivery. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Avoid silently treating follow-user schedules as UTC so future local reminder times are not rejected as already in the past. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Expose a set_preference tool so Maple can persist timezone and locale during conversations and keep follow-user schedules aligned with timezone changes. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Persist reactions as message metadata and surface them in Maple SSE and prompts while keeping continuation turns and observability predictable. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Simplify agent SSE delivery by sending one persisted message per event and using minimal typing and done signals for clients. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
No description provided.