BitQuirky.Behavior.Nodes.Decorator
Public behavior trees and state machines: runtime backend symbols in BitQuirky.Behavior.Nodes.Decorator.
Source snapshot 29003d8b1658.
On this page
Assembly: BitQuirky.Behavior.Runtime.Backend
Conditional
Section titled “Conditional”Category: Node contracts
class BitQuirky.Behavior.Nodes.Decorator.ConditionalSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Nodes/Decorator/Conditional.cs:21-39
Decorator that admits and runs its single child only while a continuously observed fact succeeds, and cancels that child synchronously when the fact fails and the decorator carries the Self abort scope.
Responsibilities:
- Provide the baked / token identity for cross-layer correspondence.
- Encode the admission rule for the runtime tick job.
Does NOT:
- Hold per-instance observation state; that lives on the per-follower runtime instance.
Members
Section titled “Members”public const BitQuirky.Behavior.Baked.BakedNodeKind Kind = ConditionalSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Nodes/Decorator/Conditional.cs:28
Baked runtime node kind.
NodeKindToken
Section titled “NodeKindToken”public const string NodeKindToken = "conditional"Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Nodes/Decorator/Conditional.cs:24-25
Canonical source node-kind token.
Admit(BehaviorResultCode factResult)
Section titled “Admit(BehaviorResultCode factResult)”public static bool Admit(BitQuirky.Behavior.Execution.BehaviorResultCode factResult)Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Nodes/Decorator/Conditional.cs:35-38
Admit the decorated child for one evaluation.
Parameters
factResult: The just-evaluated observed-fact result.
Returns
Whether the child may run under the observed fact.
Inverter
Section titled “Inverter”Category: Node contracts
class BitQuirky.Behavior.Nodes.Decorator.InverterSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Nodes/Decorator/Inverter.cs:21-47
Decorator that flips its child’sSuccess andFailure. Other status codes pass through unchanged so authority / timeout / interrupted information reaches parents intact.
Responsibilities:
- Encode the canonical inversion rule for the runtime tick job and bake-time validation.
Does NOT:
- Re-tick its child - this is a stateless decorator; the child is ticked once per parent tick.
Members
Section titled “Members”public const BitQuirky.Behavior.Baked.BakedNodeKind Kind = InverterSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Nodes/Decorator/Inverter.cs:28
Baked node kind an inverter bakes to.
NodeKindToken
Section titled “NodeKindToken”public const string NodeKindToken = "inverter"Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Nodes/Decorator/Inverter.cs:24-25
Kind token an inverter carries in authored graph source.
Decorate(BehaviorNodeStatus childStatus)
Section titled “Decorate(BehaviorNodeStatus childStatus)”public static BitQuirky.Behavior.Nodes.BehaviorNodeStatus Decorate(BitQuirky.Behavior.Nodes.BehaviorNodeStatus childStatus)Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Nodes/Decorator/Inverter.cs:35-46
Maps the child’s status to the decorator’s own: Success becomes Failure and Failure becomes Success. Running, Blocked, Interrupted, Timeout, and AuthorityMismatch pass through unchanged, so a parent still sees why the subtree stopped.
Repeat
Section titled “Repeat”Category: Node contracts
class BitQuirky.Behavior.Nodes.Decorator.RepeatSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Nodes/Decorator/Repeat.cs:49-219
Decorator that re-ticks its single child according to a RepeatPolicy.
Responsibilities:
- Encode the repeat aggregation rule for the runtime tick job.
- Provide the baked / token identity for cross-layer correspondence.
Does NOT:
- Hold per-instance counters; those live in the per-follower artifact-indexed runtime state.
Members
Section titled “Members”CountParameterId
Section titled “CountParameterId”public const int CountParameterId = 967958004Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Nodes/Decorator/Repeat.cs:109
Stable baked id for the bounded repeat-count parameter.
CountPolicyId
Section titled “CountPolicyId”public const int CountPolicyId = 967958004Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Nodes/Decorator/Repeat.cs:112
Stable baked id for CountPolicyToken.
CountPolicyToken
Section titled “CountPolicyToken”public const string CountPolicyToken = "count"Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Nodes/Decorator/Repeat.cs:94
Canonical source token for bounded repeat behavior.
ForeverPolicyId
Section titled “ForeverPolicyId”public const int ForeverPolicyId = 2056224888Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Nodes/Decorator/Repeat.cs:115
Stable baked id for ForeverPolicyToken.
ForeverPolicyToken
Section titled “ForeverPolicyToken”public const string ForeverPolicyToken = "forever"Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Nodes/Decorator/Repeat.cs:97
Canonical source token for repetition until the containing behavior exits.
public const BitQuirky.Behavior.Baked.BakedNodeKind Kind = RepeatSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Nodes/Decorator/Repeat.cs:128
Baked runtime node kind.
NodeKindToken
Section titled “NodeKindToken”public const string NodeKindToken = "repeat"Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Nodes/Decorator/Repeat.cs:124-125
Canonical source node-kind token.
PolicyParameterId
Section titled “PolicyParameterId”public const int PolicyParameterId = -826213761Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Nodes/Decorator/Repeat.cs:106
Stable baked id for the repeat policy parameter.
StopOnFailureParameterId
Section titled “StopOnFailureParameterId”public const int StopOnFailureParameterId = 1269204074Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Nodes/Decorator/Repeat.cs:91
Stable baked identifier of the optional early termination flag.
StopOnFailureParameterToken
Section titled “StopOnFailureParameterToken”public const string StopOnFailureParameterToken = "stop_on_failure"Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Nodes/Decorator/Repeat.cs:88
Optional early termination after an authored failed or blocked attempt.
UntilFailurePolicyId
Section titled “UntilFailurePolicyId”public const int UntilFailurePolicyId = -1384370814Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Nodes/Decorator/Repeat.cs:118
Stable baked id for UntilFailurePolicyToken.
UntilFailurePolicyToken
Section titled “UntilFailurePolicyToken”public const string UntilFailurePolicyToken = "until_failure"Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Nodes/Decorator/Repeat.cs:100
Canonical source token for repeat-until-child-failure behavior.
UntilSuccessPolicyId
Section titled “UntilSuccessPolicyId”public const int UntilSuccessPolicyId = 1828212339Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Nodes/Decorator/Repeat.cs:121
Stable baked id for UntilSuccessPolicyToken.
UntilSuccessPolicyToken
Section titled “UntilSuccessPolicyToken”public const string UntilSuccessPolicyToken = "until_success"Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Nodes/Decorator/Repeat.cs:103
Canonical source token for repeat-until-child-success behavior.
Decorate(BehaviorNodeStatus childStatus, int iterationsCompleted, int targetCount, RepeatPolicy policy, bool stopOnFailure, out int iterationsCompletedNext)
Section titled “Decorate(BehaviorNodeStatus childStatus, int iterationsCompleted, int targetCount, RepeatPolicy policy, bool stopOnFailure, out int iterationsCompletedNext)”public static BitQuirky.Behavior.Nodes.BehaviorNodeStatus Decorate(BitQuirky.Behavior.Nodes.BehaviorNodeStatus childStatus, int iterationsCompleted, int targetCount, BitQuirky.Behavior.Nodes.Decorator.RepeatPolicy policy, bool stopOnFailure, out int iterationsCompletedNext)Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Nodes/Decorator/Repeat.cs:154-218
Aggregates one child result with optional early failure termination.
Decorate(BehaviorNodeStatus childStatus, int iterationsCompleted, int targetCount, RepeatPolicy policy, out int iterationsCompletedNext)
Section titled “Decorate(BehaviorNodeStatus childStatus, int iterationsCompleted, int targetCount, RepeatPolicy policy, out int iterationsCompletedNext)”public static BitQuirky.Behavior.Nodes.BehaviorNodeStatus Decorate(BitQuirky.Behavior.Nodes.BehaviorNodeStatus childStatus, int iterationsCompleted, int targetCount, BitQuirky.Behavior.Nodes.Decorator.RepeatPolicy policy, out int iterationsCompletedNext)Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Nodes/Decorator/Repeat.cs:142-151
Aggregate one child tick.
Parameters
childStatus: The just-finished child’s status.iterationsCompleted: Number of completed Success, Failure, or Blocked attempts before this tick.targetCount: For FixedCount: the desired iteration count.policy: Termination policy.iterationsCompletedNext: The new iteration counter the runtime should record for the per-follower state.
RepeatPolicy
Section titled “RepeatPolicy”Category: Node contracts
enum BitQuirky.Behavior.Nodes.Decorator.RepeatPolicySource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Nodes/Decorator/Repeat.cs:11-35
Underlying type: byte
Repeat termination policy.
Members
Section titled “Members”FixedCount
Section titled “FixedCount”FixedCount = 0Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Nodes/Decorator/Repeat.cs:17
Repeatcountcompleted attempts, then return the final child’s result.
Negative or zero count is treated as one tick (no repeat).
Forever
Section titled “Forever”Forever = 3Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Nodes/Decorator/Repeat.cs:34
Restart after every completed child attempt until the containing behavior exits.
UntilFailure
Section titled “UntilFailure”UntilFailure = 1Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Nodes/Decorator/Repeat.cs:23
Repeat indefinitely after Success or Running. Stops on child Failure or Blocked, returned through to the parent.
UntilSuccess
Section titled “UntilSuccess”UntilSuccess = 2Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Nodes/Decorator/Repeat.cs:29
Repeat indefinitely after Failure, Blocked, or Running. Stops on child Success, returned through to the parent.
TimeLimit
Section titled “TimeLimit”Category: Node contracts
class BitQuirky.Behavior.Nodes.Decorator.TimeLimitSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Nodes/Decorator/TimeLimit.cs:24-59
Decorator that imposes a selected-tick wall-clock budget on its decorated subtree. If the elapsed time since the subtree became active reaches the configured budget while a descendant is still Running, the decorator returns Timeout(typed reason for ).
Responsibilities:
- Encode the timeout aggregation rule for the runtime tick job.
- Provide the baked / token identity for cross-layer correspondence.
Does NOT:
- Sample the wall clock; the tick job feeds in elapsed seconds so the rule remains pure and Burst-callable.
- Cancel awaited externals; that is the runtime instance’s job when it sees the Timeout result.
Members
Section titled “Members”public const BitQuirky.Behavior.Baked.BakedNodeKind Kind = TimeLimitSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Nodes/Decorator/TimeLimit.cs:31
Baked node kind a time limit bakes to.
NodeKindToken
Section titled “NodeKindToken”public const string NodeKindToken = "timelimit"Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Nodes/Decorator/TimeLimit.cs:27-28
Kind token a time limit carries in authored graph source.
SecondsParameterId
Section titled “SecondsParameterId”public const int SecondsParameterId = 1723256298Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Nodes/Decorator/TimeLimit.cs:38
Stable baked id of the authored wall-clock budget parameter,
BehaviorNodeParameterTokens.Seconds. A node without one keeps a zero budget
and never expires, exactly as before the parameter existed.
Decorate(BehaviorNodeStatus childStatus, float elapsedSeconds, float budgetSeconds)
Section titled “Decorate(BehaviorNodeStatus childStatus, float elapsedSeconds, float budgetSeconds)”public static BitQuirky.Behavior.Nodes.BehaviorNodeStatus Decorate(BitQuirky.Behavior.Nodes.BehaviorNodeStatus childStatus, float elapsedSeconds, float budgetSeconds)Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Nodes/Decorator/TimeLimit.cs:46-58
Reports Timeout when the decorated subtree is still running and
elapsedSeconds has reached budgetSeconds;
otherwise passes the child’s status through. Both times are in seconds, measured since
the subtree became active, and a budget of zero or less never expires.
Source fingerprint: sha256:29003d8b1658b98a79bebcd93e3b4030caf8511268b96817ab764d63df8d6c3b