BitQuirky.Behavior.Nodes.Decorator
Public behavior trees and state machines: runtime symbols in BitQuirky.Behavior.Nodes.Decorator.
Source snapshot ad0983d00d77.
On this page
Assembly: BitQuirky.Behavior.Runtime
Conditional
Section titled “Conditional”Category: Node contracts
class BitQuirky.Behavior.Nodes.Decorator.ConditionalSource declaration: Packages/io.bitquirky.behavior/Runtime/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/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/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/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/Nodes/Decorator/Inverter.cs:38-64
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/Nodes/Decorator/Inverter.cs:45
Baked node kind an inverter bakes to.
NodeKindToken
Section titled “NodeKindToken”public const string NodeKindToken = "inverter"Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/Decorator/Inverter.cs:41-42
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/Nodes/Decorator/Inverter.cs:52-63
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/Nodes/Decorator/Repeat.cs:66-199
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/Nodes/Decorator/Repeat.cs:108
Stable baked id for the bounded repeat-count parameter.
CountPolicyId
Section titled “CountPolicyId”public const int CountPolicyId = 967958004Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/Decorator/Repeat.cs:111
Stable baked id for CountPolicyToken.
CountPolicyToken
Section titled “CountPolicyToken”public const string CountPolicyToken = "count"Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/Decorator/Repeat.cs:93
Canonical source token for bounded repeat behavior.
ForeverPolicyId
Section titled “ForeverPolicyId”public const int ForeverPolicyId = 2056224888Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/Decorator/Repeat.cs:114
Stable baked id for ForeverPolicyToken.
ForeverPolicyToken
Section titled “ForeverPolicyToken”public const string ForeverPolicyToken = "forever"Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/Decorator/Repeat.cs:96
Canonical source token for repetition until the containing behavior exits.
public const BitQuirky.Behavior.Baked.BakedNodeKind Kind = RepeatSource declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/Decorator/Repeat.cs:127
Baked runtime node kind.
NodeKindToken
Section titled “NodeKindToken”public const string NodeKindToken = "repeat"Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/Decorator/Repeat.cs:123-124
Canonical source node-kind token.
PolicyParameterId
Section titled “PolicyParameterId”public const int PolicyParameterId = -826213761Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/Decorator/Repeat.cs:105
Stable baked id for the repeat policy parameter.
UntilFailurePolicyId
Section titled “UntilFailurePolicyId”public const int UntilFailurePolicyId = -1384370814Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/Decorator/Repeat.cs:117
Stable baked id for UntilFailurePolicyToken.
UntilFailurePolicyToken
Section titled “UntilFailurePolicyToken”public const string UntilFailurePolicyToken = "until_failure"Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/Decorator/Repeat.cs:99
Canonical source token for repeat-until-child-failure behavior.
UntilSuccessPolicyId
Section titled “UntilSuccessPolicyId”public const int UntilSuccessPolicyId = 1828212339Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/Decorator/Repeat.cs:120
Stable baked id for UntilSuccessPolicyToken.
UntilSuccessPolicyToken
Section titled “UntilSuccessPolicyToken”public const string UntilSuccessPolicyToken = "until_success"Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/Decorator/Repeat.cs:102
Canonical source token for repeat-until-child-success behavior.
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/Nodes/Decorator/Repeat.cs:141-198
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/Nodes/Decorator/Repeat.cs:28-52
Underlying type: byte
Repeat termination policy.
Members
Section titled “Members”FixedCount
Section titled “FixedCount”FixedCount = 0Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/Decorator/Repeat.cs:34
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/Nodes/Decorator/Repeat.cs:51
Restart after every completed child attempt until the containing behavior exits.
UntilFailure
Section titled “UntilFailure”UntilFailure = 1Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/Decorator/Repeat.cs:40
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/Nodes/Decorator/Repeat.cs:46
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/Nodes/Decorator/TimeLimit.cs:41-76
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/Nodes/Decorator/TimeLimit.cs:48
Baked node kind a time limit bakes to.
NodeKindToken
Section titled “NodeKindToken”public const string NodeKindToken = "timelimit"Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/Decorator/TimeLimit.cs:44-45
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/Nodes/Decorator/TimeLimit.cs:55
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/Nodes/Decorator/TimeLimit.cs:63-75
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:ad0983d00d773d882bc61865e18d8c5559e009d181e5891575cd7f262515b23e