session

package
v7.2.103 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 27, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package session derives stable conversation identities from protocol request roots.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CallerScope

func CallerScope(value string) string

CallerScope returns an irreversible namespace for a downstream caller credential.

func ClaudeMetadataSessionID added in v7.2.103

func ClaudeMetadataSessionID(payload []byte) string

ClaudeMetadataSessionID extracts the explicit Claude Code session from current JSON metadata or the legacy user_id suffix before bounding the surrounding metadata container.

func DeriveID

func DeriveID(format sdktranslator.Format, payload []byte, callerScope string) string

DeriveID builds a stable identity from leading instructions and the first complete user input.

func DerivedID

func DerivedID(metadata map[string]any) string

DerivedID returns a derived session identity stored in execution metadata.

func Enrich

Enrich derives a session identity once and places it in both request and option metadata.

func NormalizeExplicitID added in v7.2.103

func NormalizeExplicitID(raw string) string

NormalizeExplicitID validates an explicit client-provided session identifier. It preserves opaque printable values while rejecting oversized or control-bearing IDs.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL