Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/tomevault-io/skills-registry --skill babuza-session명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SKILL.md 표시 중
SOC 직업 분류 기준
| name | babuza-session |
| description | | Use when this capability is needed. |
Package:
github.com/fanaujie/babuza/pkg/sessionClient session management for exactly-once semantics and idempotent command execution.
You are an expert at babuza session management. Help users by:
Refer to the local files for detailed API:
./references/session-api.md - Session interfaces, options, and eviction strategies.Select the session management strategy using BabuzaComponentBuilder.
import "github.com/fanaujie/babuza/pkg/builder"
func buildWithSession() *ibabuza.BabuzaComponent {
return builder.NewBabuzaComponentBuilder(&builder.BabuzaComponentConfig{
// Select Session Type: LRUSession, ExpireSession, or NoOpSession
SessionType: builder.LRUSession,
}).Build()
}
Limit the maximum number of concurrent sessions.
import (
"github.com/fanaujie/babuza/pkg/builder"
"github.com/fanaujie/babuza/pkg/session"
)
func buildLruSession() {
builder.NewBabuzaComponentBuilder(&builder.BabuzaComponentConfig{
SessionType: builder.LRUSession,
}).SetSessionOptions(
session.SetLruMgrOptionsWithMaxSessions(256),
).Build()
}
Set the session expiration timeout.
import (
"time"
"github.com/fanaujie/babuza/pkg/builder"
"github.com/fanaujie/babuza/pkg/session"
)
func buildExpireSession() {
builder.NewBabuzaComponentBuilder(&builder.BabuzaComponentConfig{
SessionType: builder.ExpireSession,
}).SetSessionOptions(
session.SetExpiredMgrOptionsWithExpiredTime(time.Hour),
).Build()
}
| Type | Builder Constant | Eviction Strategy | Default |
|---|---|---|---|
| LRU | builder.LRUSession | Evicts least-recently-used when max reached | maxSessions=128 |
| Expire | builder.ExpireSession | Auto-expires after timeout | expiredTime=30min |
| NoOp | builder.NoOpSession | No session tracking | - |
| Scenario | Recommended Type |
|---|---|
| Fixed number of clients | LRU |
| Dynamic/short-lived clients | Expire |
| No idempotency needed | NoOp |
| High-throughput, retry-safe | LRU or Expire |
SequenceNumber to prevent duplicate command execution on retries.RegisterSession before proposing commands.UnregisterSession when a client disconnects to free resources.SequenceNumber, returning cached results for duplicate requests.Converted and distributed by TomeVault — claim your Tome and manage your conversions.