feat(behaviors): tf.behaviors.discover() — emergent behavior discovery - #5
Merged
Conversation
Adds a BehaviorsResource exposing discover(), posting to POST /lattice/discover. Returns clusters of like-behaving subjects (DiscoveredBehavior: label, prevalence, stability, size, memberSubjects, exemplarEvidence) sorted most-common-and-cohesive first. An empty result means the engine abstained — not enough signal — never 'no behaviors'. Completes the behaviors.discover path end-to-end: engine core -> DiscoverBehaviors RPC -> HTTP proxies -> SDK. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
The final slice of
behaviors.discover— the public SDK method. Completes the path: engine core (#39) →DiscoverBehaviorsRPC (#40) → HTTP proxies (memory-thinkfleet #35, #36) → SDK.What
tf.behaviors.discover(params?)→POST /lattice/discover. Returns clusters of like-behaving subjects the engine found in the data (not a fixed menu):DiscoveredBehavior:label,prevalence,stability(cohesion),size,memberSubjects(medoid first),exemplarEvidence. An empty result means the engine abstained — not enough signal — never "no behaviors exist".Notes
BehaviorsResourcewired into the client astf.behaviors; types exported (DiscoverParams,DiscoveredBehavior,DiscoverResult)./lattice/discoverroute) being deployed for runtime; compiles independently.Verification
tscclean;tsupbuild emits ESM/CJS/DTS;tf.behaviors.discover+ types public indist/index.d.ts.Remaining (engine follow-ups, separate)
behavior_pattern+ feed into prediction features🤖 Generated with Claude Code