Skip to main content

Crate kcode_k1_chat_thread_ktools

Crate kcode_k1_chat_thread_ktools 

Source
Expand description

§K1 chat-thread Ktools 0.1.4

ChatThreadKtools is the synchronous per-thread dispatcher for CurrentTime, the five Kmap Ktools, the three read-only Social Ktools, and optionally the GetLaunchNode and SetLaunchNode pair. new preserves an Actions-only path; new_with_social adds one configured SocialKtools facade; new_with_social_and_set_launch_node preserves its signature and derives both launch-node Ktools from the supplied SetLaunchNodeKtool owner.

bind_authorization installs one exact AccessContext, ProfileId, and AccessPolicy triple. Rebinding the same triple is idempotent; a different active triple fails before changing either owner. clear_authorization clears the active triple and Actions authorization while preserving Actions session state.

launch delegates CurrentTime and Kmap behavior unchanged to Chat Thread Actions. ListContacts, ListGroups, and GetGroup require configured Social Ktools and active authorization. Missing Social composition returns social Ktools are unavailable; missing authorization returns social authorization is not active.

Exact GetLaunchNode requires configured launch-node Ktools and active authorization, then delegates the model-supplied authority and target through the getter with only the bound AccessContext. Missing composition returns launch-node Ktools are unavailable; missing authorization returns GetLaunchNode authorization is not active. Exact SetLaunchNode preserves its existing configured-owner and active-authorization behavior.

ChatThreadKtoolExecutor is the cloneable, mutex-serialized handle used when synchronous calls run outside the session actor. Its constructors preserve the same three compositions. bind_authorization, clear_authorization, launch, and supports lock only this dispatcher; callers do not need to retain actor or persistence locks while a call executes. supports reports only calls the concrete composition can execute, including configured GetLaunchNode for generic synchronous preflight.

KtoolDocs, SendMessage, WebSearch, registry gating, persistence, provider work, HTTP, retry, automatic node loading, and migration are outside this package.

Structs§

AccessContext
AccessPolicy
ChatThreadKtoolExecutor
ChatThreadKtools
GetLaunchNodeKtool
ProfileId
SetLaunchNodeKtool