Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/EBWi11/AgentSmith-HUB
/ functions
Functions
2,165 in github.com/EBWi11/AgentSmith-HUB
⨍
Functions
2,165
◇
Types & classes
243
↓ 240 callers
Method
EngineCheck
EngineCheck executes all rules in the ruleset on the provided data using the new flexible syntax.
src/rules_engine/engine_core.go:750
↓ 82 callers
Function
buildRulesetFromXML
helper to build and run a ruleset against data
src/rules_engine/iterator_test.go:8
↓ 81 callers
Method
Close
()
src/rules_engine/cep_value_store.go:24
↓ 67 callers
Method
get
(key string)
src/cluster/instruction_sync_integration_test.go:36
↓ 57 callers
Method
Stop
()
src/project/project_struct.go:162
↓ 53 callers
Method
AddMatch
AddMatch records a stage match. Maintains timestamp-sorted order.
src/rules_engine/cep_condition.go:109
↓ 52 callers
Function
ParseCEPCondition
============================================================================ Top-Level Parse Function ================================================
src/rules_engine/cep_condition.go:442
↓ 52 callers
Function
buildTestRuleset
(tb testing.TB, xmlContent string)
src/rules_engine/cep_test.go:29
↓ 51 callers
Function
GetComponentPath
GetComponentPath returns the full file path for a component It also creates the directory if it doesn't exist Parameters: - componentType: type of com
src/api/file_operations.go:71
↓ 42 callers
Function
ValidateWithDetails
ValidateWithDetails performs detailed validation and returns structured errors with line numbers
src/rules_engine/engine_struct.go:424
↓ 39 callers
Method
Get
Get retrieves a cached result if it exists
src/rules_engine/regex_result_cache.go:54
↓ 36 callers
Method
String
String joins lines for LLM context and prompts (plain text).
src/agent/memory_notes.go:20
↓ 32 callers
Method
Put
Put stores a result in the cache
src/rules_engine/regex_result_cache.go:71
↓ 31 callers
Function
NewSequenceState
NewSequenceState creates a new SequenceState with the given expiration.
src/rules_engine/cep_condition.go:93
↓ 30 callers
Method
SetStatus
SetStatus sets the output status and error information
src/output/output.go:380
↓ 29 callers
Function
firstNonBlank
(data map[string]interface{}, keys ...string)
config/plugin/pushAlertToIris.go:316
↓ 28 callers
Function
ReadComponent
ReadComponent reads content from a component file Parameters: - path: full file path to read from Returns: - content: file content as string - error:
src/api/file_operations.go:194
↓ 27 callers
Method
Name
()
src/skill/skill.go:34
↓ 25 callers
Method
String
String returns a debug string for the state manager.
src/rules_engine/cep_state.go:773
↓ 25 callers
Function
assertStage
(t *testing.T, stage CEPStage, expectedAbsent bool, expectedEventIDs []string)
src/rules_engine/cep_test.go:75
↓ 23 callers
Method
SetDownstream
(downstreamID string, ch *chan map[string]interface{})
src/input/input.go:611
↓ 23 callers
Function
log
(message, ...args)
web/src/composables/useSmartRefresh.js:31
↓ 22 callers
Function
ParseRuleset
(rawRuleset []byte)
src/rules_engine/engine_parser.go:45
↓ 22 callers
Method
Reset
Reset resets all samples and counters
src/common/sampler.go:215
↓ 21 callers
Method
SetProjectStatus
(status common.Status, err error)
src/project/project.go:2895
↓ 20 callers
Method
String
()
src/api/pending_changes.go:36
↓ 20 callers
Method
scopedRedisKey
(key string)
src/plugin/plugin.go:465
↓ 20 callers
Method
set
(key string, value interface{}, expiration int)
src/cluster/instruction_sync_integration_test.go:47
↓ 19 callers
Function
buildThresholdRuleset
buildThresholdRuleset wraps buildRulesetFromXML and registers cache cleanup.
src/rules_engine/engine_threshold_cache_test.go:26
↓ 18 callers
Method
CheckComplete
============================================================================ Sequence Completion Check (Phase 3: verify temporal ordering) ===========
src/rules_engine/cep_condition.go:623
↓ 18 callers
Method
Start
()
src/project/project_struct.go:161
↓ 18 callers
Method
cleanup
cleanup performs cleanup when normal stop fails or panic occurs
src/rules_engine/engine_struct.go:2042
↓ 17 callers
Method
EvaluateEvent
============================================================================ Stage Evaluation (Phase 1+2: match event against stage expressions) =====
src/rules_engine/cep_condition.go:496
↓ 17 callers
Method
SetStatus
SetStatus sets the input status and error information
src/input/input.go:264
↓ 15 callers
Function
NewRegexResultCache
NewRegexResultCache creates a new regex result cache with specified capacity
src/rules_engine/regex_result_cache.go:35
↓ 15 callers
Function
assertIntSlice
(t *testing.T, got, expected []int)
src/rules_engine/cep_test.go:95
↓ 15 callers
Function
findRulesetPaths
findRulesetPaths resolves the actual file paths for a ruleset by checking the loaded ruleset's Path field or searching the filesystem. Returns (formal
src/api/ruleset_folders.go:56
↓ 14 callers
Method
AddChange
AddChange adds or updates a pending change
src/api/pending_changes.go:97
↓ 14 callers
Method
SetWithTTL
SetWithTTL stores a key set with the given TTL, overwriting any existing entry.
src/rules_engine/engine_threshold_cache.go:212
↓ 14 callers
Method
StopForTesting
(timeout time.Duration)
src/project/project.go:1938
↓ 14 callers
Method
clearCache
clearCache removes all entries from the cache.
src/rules_engine/regex_cache.go:111
↓ 14 callers
Function
parseProjectInfoFromPNS
parseProjectInfoFromPNS parses project information from ProjectNodeSequence Format: "INPUT.api_sec.RULESET.test.OUTPUT.print_demo" -> project: "api_se
src/rules_engine/engine_core.go:24
↓ 14 callers
Function
traverseComponents
(dir, suffix string)
src/main.go:319
↓ 13 callers
Method
SetStatus
SetStatus sets the ruleset status and error information
src/rules_engine/engine_struct.go:2031
↓ 13 callers
Function
buildResultError
(error, fallbackMessage, fallbackPayload = {})
web/src/api/index.js:150
↓ 13 callers
Method
genericContains
SIMD implementation functions are declared in platform-specific files: - simd_amd64.go for x86_64 platforms - simd_arm64.go for ARM64 platforms - simd
src/rules_engine/simd_optimizations.go:178
↓ 12 callers
Function
NewCEPStateManager
NewCEPStateManager creates a new state manager.
src/rules_engine/cep_state.go:176
↓ 12 callers
Method
Token
Token wraps the xml.Decoder Token method to track line numbers
src/rules_engine/engine_parser.go:30
↓ 12 callers
Method
TrackAbsenceKey
TrackAbsenceKey registers a key for absence scanning. In Redis mode, stores a separate tracking key so any cluster node can discover it. In local cach
src/rules_engine/cep_state.go:323
↓ 12 callers
Method
atEnd
atEnd returns true if all tokens have been consumed.
src/rules_engine/cep_condition.go:233
↓ 12 callers
Method
genericContainsCaseInsensitive
genericContainsCaseInsensitive provides a fast generic case-insensitive contains
src/rules_engine/simd_optimizations.go:183
↓ 12 callers
Method
peek
peek returns the current token without advancing.
src/rules_engine/cep_condition.go:228
↓ 12 callers
Method
processInstructionInternal
processInstructionInternal processes an instruction with proper locking
src/cluster/instruction_sync.go:205
↓ 11 callers
Function
BuildStateKey
BuildStateKey constructs a state key from the GroupByID and correlation values.
src/rules_engine/cep_state.go:191
↓ 11 callers
Function
GetCheckDataFromCache
(cache map[string]common.CheckCoreCache, checkKey string, data map[string]interface{}, checkKeyList []string)
src/rules_engine/engine_utils.go:259
↓ 11 callers
Method
GetExpiredAbsenceKeys
GetExpiredAbsenceKeys returns all absence keys that have expired (ExpiresAt <= nowMs). In local cache mode, uses the in-memory map. In Redis mode, sca
src/rules_engine/cep_state.go:379
↓ 11 callers
Method
GetState
GetState retrieves a SequenceState by key. Returns nil if not found or expired.
src/rules_engine/cep_state.go:242
↓ 11 callers
Function
RedisExpire
RedisExpire sets the expiration time for a key
src/common/redis.go:410
↓ 11 callers
Method
addRuntimeError
(message string)
src/rules_engine/engine_struct.go:2135
↓ 11 callers
Function
findElementInRule
findElementInRule finds the line number of an element within a specific rule
src/rules_engine/engine_struct.go:518
↓ 10 callers
Method
DownstreamCount
()
src/input/input.go:604
↓ 10 callers
Method
GetChange
GetChange retrieves a specific pending change
src/api/pending_changes.go:131
↓ 10 callers
Function
GetCompiledRegex
GetCompiledRegex is the public interface to get a compiled regex with caching.
src/rules_engine/regex_cache.go:122
↓ 10 callers
Function
ParseFunctionCall
ParseFunctionCall parses a function call of the form "functionName(arg1, arg2, ...)"
src/rules_engine/engine_struct.go:2161
↓ 10 callers
Function
RedisKeys
(key string)
src/common/redis.go:286
↓ 10 callers
Function
RedisLPush
===================== List Helpers ===================== RedisLPush pushes value to list head, keeps maxLen if >0
src/common/redis.go:394
↓ 10 callers
Function
RulesetBuild
RulesetBuild parses and validates a Ruleset with new flexible rule syntax, initializing all field paths and check functions.
src/rules_engine/engine_struct.go:2343
↓ 10 callers
Method
SetStatus
(status common.Status, err error)
src/skill/skill.go:102
↓ 10 callers
Function
getSampleDataFromComponent
Get sample data from a specific component
src/api/sample_data_intelligent.go:708
↓ 9 callers
Function
CalculateRefCount
CalculateRefCount dynamically calculates how many running projects are using the given PNS excludeProjectID allows excluding a specific project from t
src/project/project_struct.go:51
↓ 9 callers
Method
CheckExist
(t string, id string)
src/project/project.go:2105
↓ 9 callers
Function
ForEachProject
Safe iteration functions
src/project/project_struct.go:1161
↓ 9 callers
Function
GetPNSAgent
PNS Agent accessors
src/project/project_struct.go:564
↓ 9 callers
Method
PublishInstruction
(componentName, componentType, content, operation string, dependencies []string, metadata map[string]interface
src/cluster/instruction_sync.go:507
↓ 9 callers
Method
Size
Size returns the current number of entries in the cache
src/rules_engine/regex_result_cache.go:117
↓ 9 callers
Function
newTestLocalCache
============================================================================ Shared Test Helpers =====================================================
src/rules_engine/cep_test.go:17
↓ 8 callers
Method
DeleteDownstream
(downstreamID string)
src/input/input.go:621
↓ 8 callers
Method
FuncEvalOther
(funcArgs ...interface{})
src/plugin/plugin.go:741
↓ 8 callers
Method
GetCurrentVersion
()
src/cluster/sync_listener.go:102
↓ 8 callers
Function
GetPNSRuleset
PNS Ruleset accessors
src/project/project_struct.go:502
↓ 8 callers
Method
GetProjectInputs
===== Thread-safe accessor functions for GlobalProject ===== Project dynamic component accessors - these replace the removed project-level component m
src/project/project_struct.go:169
↓ 8 callers
Function
GetSIMDOperations
GetSIMDOperations returns the global SIMD operations instance
src/rules_engine/simd_integration.go:15
↓ 8 callers
Method
GetSnapshot
(ref string)
src/rules_engine/cep_value_store.go:145
↓ 8 callers
Method
RecordInvocation
RecordInvocation increments the appropriate counter based on success/failure Skip recording if plugin is in test mode
src/plugin/plugin.go:1034
↓ 8 callers
Method
Restart
(recordOperation bool, triggeredBy string)
src/project/project.go:1335
↓ 8 callers
Function
getFirstSequenceFromRuleset
(t *testing.T, rs *Ruleset)
src/rules_engine/cep_test.go:63
↓ 8 callers
Function
getRulesetBaseDir
getRulesetBaseDir returns the base directory for rulesets
src/api/ruleset_folders.go:29
↓ 8 callers
Method
resolvedBatchSize
()
src/output/output.go:185
↓ 8 callers
Method
resolvedFlushDur
()
src/output/output.go:189
↓ 7 callers
Method
Call
Call executes a function with circuit breaker protection
src/common/redis.go:44
↓ 7 callers
Method
Del
Del removes a key from the classify map.
src/rules_engine/engine_threshold_cache.go:223
↓ 7 callers
Method
FuncEvalCheckNode
(funcArgs ...interface{})
src/plugin/plugin.go:647
↓ 7 callers
Function
SIMDOptimizedANDLogic
SIMDOptimizedANDLogic performs AND logic with SIMD batch operations
src/rules_engine/simd_optimizations.go:305
↓ 7 callers
Function
SIMDOptimizedORLogic
SIMDOptimizedORLogic performs OR logic with SIMD batch operations
src/rules_engine/simd_optimizations.go:294
↓ 7 callers
Method
Write
(p []byte)
src/common/aliyun_sls.go:42
↓ 7 callers
Function
addHitRuleID
addHitRuleID appends the hit rule ID to the data map.
src/rules_engine/engine_core.go:2508
↓ 7 callers
Method
advance
advance moves to the next token. Returns false if at end.
src/rules_engine/cep_condition.go:218
↓ 7 callers
Function
countLocalChangesForDir
(opts localChangeCountOptions)
src/api/local_files.go:30
↓ 7 callers
Function
createComponent
(componentType string, c echo.Context)
src/api/components.go:941
↓ 7 callers
Function
deleteComponent
(componentType string, c echo.Context)
src/api/components.go:1127
next →
1–100 of 2,165, ranked by callers