Repository navigation
feat: Dakera server 0.12.2 commands (dk 0.8.1) - #155
Merged
Merged
Conversation
dk whoami, dk agent create, dk keys edit (alias patch; --name, --namespaces, --all-namespaces, --no-namespaces, -n for the namespace route), dk keys rotate --grace, dk session touch, dk session start --idle-timeout, --preview / --include-derived / --offset on the memory listings and --preview on knowledge full-graph, dk admin derivations-status / derivations-drain / session-idle-timeout. Built on dakera-client 0.12.2, taken from the dakera-rs PR branch as a git dependency until that version is published on crates.io; switch it back to dakera-client = "0.12.2" before merge. Also fixes dk keys rotate (it read `key`, the server answers `new_key`), the session memories total, and the pre-existing clippy findings in test code. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017ZHVK5VC49gnBM7bueRH88
The SDK release is on crates.io, so the temporary git dependency on the dakera-rs PR branch goes back to a registry version. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017ZHVK5VC49gnBM7bueRH88
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
dkcommands and flags for Dakera server v0.12.2 (Dakera-AI/dakera#916). Version 0.8.0 → 0.8.1.The CLI stays compatible with v0.11.108, v0.12.0 and v0.12.1. The new commands need a v0.12.2 server. On v0.12.0 or v0.12.1 they either fail with no route (exit 3 or 1), or the server ignores the new flag. Where it matters,
dksays so:keys rotate --gracewarns that the old key was deactivated at once, andadmin session-idle-timeoutreports that the server predates the setting. The README has a compatibility table per command.How this depends on the new SDK
dkuseddakera-client = "0.12"from crates.io. The new commands usedakera-client0.12.2 (Dakera-AI/dakera-rs#170), now published on crates.io.Cargo.tomlpinsdakera-client = "0.12.2". While the SDK was unpublished, this PR temporarily used a git dependency on the dakera-rs PR branch; commit 3d90800 switched it back.The new commands call the API through the SDK (
create_agent,update_key/update_namespace_key,rotate_key_with_grace,whoami,start_session_with,touch_session,agent_memories_with,session_memories_with,derivations_status,drain_derivations,get_config/set_session_idle_timeout). The one exception isknowledge full-graph --preview, which adds the field to the existing raw REST call.Changes
dk whoamicallsGET /v1/auth/whoami. It shows scope, grants, unrestricted, the grant syntax version and inert grants.dk agent create <agent_id>callsPOST /v1/agents. It is idempotent.dk keys edit <key_id>(aliaspatch):PATCH /admin/keys/{id}, or with-n <ns>,PATCH /v1/namespaces/{ns}/keys/{id}.--name,--namespaces a,b(p*patterns allowed),--all-namespaces(sendsnull),--no-namespaces(sends[]).dk keys rotate --grace <duration>accepts up to 7 days and shows the new key id and the old key's deadline.dk session touch <id>anddk session start --idle-timeout <duration>(0= never, at most 30 days).--preview <chars>(1–10000) onagent memories,session memoriesandknowledge full-graph. The memory listings gainCONTENT_LENandTRUNCATEDcolumns and a hint to usedk memory getfor the full text.--include-derivedonagent memories.--offseton both memory listings;--limitonsession memories.dk admin derivations-status,dk admin derivations-drain [--timeout], anddk admin session-idle-timeout [<duration>](show or set). These follow the CLI's flatadmin <name>style.s,m,h,dsuffixes.dk session listshowsended_reason. Shell completions and the README cover the new commands.dk keys rotatenever printed the new key: it readkey, but the server answersnew_key.dk session memoriesprintedtotal: 0.InvalidRequesterrors now exit 5.items_after_test_module,field_reassign_with_default, …) are fixed socargo clippy --all-targets -- -D warningspasses.session endwith a Read key now returns 403.include_derived=true.Testing
cargo checkpassescargo clippy -- -D warningspasses (also--all-targets)cargo fmt --checkpassescargo testpasses: 318 passed, 22 ignored (live-server tests). That includes the newtests/v0122.rs(26 httpmock tests of the compileddk) and unit tests for the new flags. The route audit list gains the v0.12.2 routes. Re-run against the publisheddakera-client0.12.2: all pass.Checklist
CHANGELOG.mdsession listgainended_reason, and the memory listings gaincontent_len/truncatedonly with--preview.dakera-clientis the published0.12.2(3d90800)🤖 Generated with Claude Code
https://claude.ai/code/session_017ZHVK5VC49gnBM7bueRH88