Repository navigation
Support Dakera 0.12.4 - #208
Draft
ferhimedamine wants to merge 7 commits into
Draft
ferhimedamine wants to merge 7 commits into
ferhimedamine wants to merge 7 commits into
Conversation
- MemoryPolicy: *_ttl_seconds default to None (server default: no TTL by type) and dedup_threshold to 0.95 (server default_store_dedup_threshold); docstrings no longer claim 4h/30d defaults. - recall(): top_k is omitted unless set (server default 10); include_associated defaults to None and is sent whenever set, so False turns it off now that the server default is on. - list_audit_events(cursor=): raises ValueError; GET /v1/audit has no cursor pagination. AuditListResponse.cursor is always None. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DKmYrmGxPEHfmA624vFLcd
- ConsolidateResponse: consolidated_memory, source_memory_ids, memories_removed (server ConsolidateResponse). - SummarizeResponse: summary_memory, source_count (server SummarizeResponse). - consolidate() docstring: describe auto-detection without memory_ids (most important memory with neighbours at cosine >= threshold, merged with up to 4 of them; 400 when none are that similar). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DKmYrmGxPEHfmA624vFLcd
GET /v1/audit pages by cursor from server 0.12.4: list_audit_events(cursor=) sends it and AuditListResponse.cursor is the server's next_cursor (it raised ValueError, since the server had none). agent_memories(memory_type=) and agent_sessions(active_only=) are applied by 0.12.4 servers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DKmYrmGxPEHfmA624vFLcd
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DKmYrmGxPEHfmA624vFLcd
…sync import) Checked against the engine's request and response types and router at 0.12.4: - forget_memories(): every POST /v1/memory/forget selector, including about, request, until, min_score, limit, restorable and dry_run; ForgetResponse with forgotten_ids and intent (ForgetIntent). forget(restorable=). - detect_forget_requests(): POST /v1/memory/forget/detect (ForgetDetectResponse). - store_memory() returns forget_request; BatchStoreMemoryResponse carries forget_requests (StoredForgetRequest) and duplicates (BatchDuplicate). - recall(rerank_head=, importance_weighted=), sent only when set; RecallResponse.instructions, .degraded, .is_degraded. - get_memory(projection_days=), import_memories(run_async=) with wait_for_import_job(), get_namespace_ner_config(). - MemoryPolicy.stored, GraphEdge/GraphLinkResponse.label, EntityExtractionResponse.extractor/.warnings, DeduplicatedMemory.content. - Failure lists: DeduplicateResponse.groups_failed, CrossAgentNetworkResponse .unavailable, CompressResponse.deprecation_skipped/.deprecation_error, TtlCleanupResponse.failed, DerivationStatus.entity_tagging. - autopilot_update_config(consolidation_mode=), WarmCacheRequest query_vector / min_score_threshold / recently_accessed_within. - Docstrings for the 200/202/409/503 answers of key and quota changes, the honoured analytics/session/agent filters and auto_summarize. Sync and async clients; tests/test_v0124.py covers each, also against a server that sends none of the new fields. The route snapshot gains the detect route. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DKmYrmGxPEHfmA624vFLcd
Version 0.15.0 (pyproject, __version__, uv.lock). The CHANGELOG [0.15.0] entry gathers this branch's changes and corrects the audit cursor entry: the cursor pages for real (next_cursor), it does not raise. README: what's new for server v0.12.4. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DKmYrmGxPEHfmA624vFLcd
A server before v0.12.4 ignores about, request, until, min_score, limit, restorable and dry_run and still applies memory_ids and the filters, so forget_memories(memory_ids=[...], dry_run=True) or about= with session_id= would really delete what the filters select there. When one of those fields is combined with memory_ids or a filter, forget_memories() and forget(restorable=True) (sync and async) first read the server version from the cached capabilities() and raise ValidationError, sending nothing, unless the server is v0.12.4 or later. A server that advertises no readable version or has no capabilities route (404) counts as older; any other failure to read the capabilities is raised before the forget is sent. Without a filter no check is made: an older server refuses such a body with 400. Tests: new server sends; old, unknown and pre-capabilities servers are refused with nothing sent; a capabilities error is raised; the version is read once; the no-filter and plain cases make no capabilities call. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DKmYrmGxPEHfmA624vFLcd
This branch has not been deployed
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.
What
Support for Dakera server v0.12.4 in the Python SDK (sync and async clients), version 0.15.0. Every item was checked against the engine's request/response types and router at 0.12.4.
New calls and fields
forget_memories(agent_id, *, memory_ids=, memory_type=, session_id=, tags=, below_importance=, about=, request=, until=, min_score=, limit=, restorable=, dry_run=)→ForgetResponse(deleted_count,forgotten_ids,intent).aboutforgets by description;requestforgets what a user's request to forget means, in any language, after the server confirms it is one. Invalid combinations (about+request,min_scoreoutside[0, 1],limitoutside1..50, texts above 8000 characters) raiseValueErrorbefore sending.detect_forget_requests(texts)→POST /v1/memory/forget/detect(ForgetDetectResponse).forget(..., restorable=True);DeduplicatedMemory.contentand the"deletion"trash kind.forget_requeston the stored memory; batch storeforget_requests/duplicates.rerank_head=/importance_weighted=(sent only when set),RecallResponse.instructions,.degraded,.is_degraded.get_memory(..., projection_days=N)(strength projection),import_memories(..., run_async=True)+wait_for_import_job(),get_namespace_ner_config()(withsource).MemoryPolicy.stored, linklabelonGraphEdge/GraphLinkResponse,EntityExtractionResponse.extractor/.warnings.DeduplicateResponse.groups_failed,CrossAgentNetworkResponse.unavailable,CompressResponse.deprecation_skipped/.deprecation_error,TtlCleanupResponse.failed,DerivationStatus.entity_tagging.autopilot_update_config(consolidation_mode=),WarmCacheRequest.query_vector/.min_score_threshold/.recently_accessed_within; docstrings for the200/202/409/503answers of key and quota changes.Fixes already on this branch (verified against the server)
recall()no longer sendstop_k=5or dropsinclude_associated=False; the server's defaults apply unless the caller sets a value.MemoryPolicyTTL defaults areNone(no expiry by type) anddedup_thresholdis0.95, matching the server.ConsolidateResponse/SummarizeResponsenow have the shapes the server actually sends (breaking for code that read the old fields, which the server never sent).list_audit_events(cursor=)pages using the server'snext_cursor.auto_summarize,summary_pending,agent_memories(memory_type=),agent_sessions(active_only=)and analyticsperiod/namespacebehaviour.Error handling needed no code change:
202was already treated as success,409raisesConflictError, and503/429exposeretry_afterand are retried after the server'sRetry-After(for example, a namespace fenced after a failed delete returns503withRetry-After: 5). New tests cover these paths.Why
Server v0.12.4 adds forgetting by meaning, standing instructions, recall degradation reporting, async imports and several fields that make failures visible. It also changes defaults (
importance_weightedfalse, associated memories on), which the SDK must leave to the server.Compatibility
Works with v0.12.0 – v0.12.3 servers. New request fields are sent only when set, and new response fields are
Noneor empty from an older server. The only breaking change is theConsolidateResponse/SummarizeResponsemodel shapes noted above, so this is a minor version bump.Tests run (locally)
tests/test_v0124.py(57 tests) covers each new method and field with mocked HTTP for both clients, including answers from an older server.tests/v0_12_routes.txtnow includes the new detect route. The live-server integration tests were not run locally.🤖 Generated with Claude Code