Skip to content

@agentctx/types

Standalone type definitions package. Use this when you only need CTX types without the full runtime.

Terminal window
npm install @agentctx/types
type CTXOperator = '?' | '!' | '>' | '+' | '~' | '-' | '^';
OperatorNamePurpose
?SearchFuzzy search in a plane
!LookupExact ID lookup
>ExecuteCall a tool
+WriteStore data
~UpdateModify existing data
-DeleteRemove data
^DelegateDispatch to another agent
type CTXPlane = 'k' | 't' | 's' | 'm' | 'a' | 'i' | 'l';
PlaneName
kKnowledge
tTools
sSkills
mMemory
aAgents
iInspection
lLLM
interface CTXStatement {
operator: CTXOperator;
plane: CTXPlane;
verb?: CTXVerb;
decorator?: CTXDecorator;
target: string;
filters: CTXFilter[];
payload?: CTXPayload;
raw: string;
}
interface CTXFilter {
type: 'tag' | 'time' | 'limit' | 'project' | 'format';
value: string;
}
interface GatewayResult {
ok: boolean;
op: string;
ms: number;
data: unknown;
error?: string;
code?: string;
}
interface CTXParseErrorData {
code: string; // e.g., 'INVALID_OPERATOR'
position: number;
found: string;
expected?: string;
}
CodeCause
INVALID_OPERATORCharacter at position 0 is not a valid operator
INVALID_PLANECharacter at position 1 is not a valid plane
INVALID_COMBOOperator×plane combination not allowed
MAX_INPUT_EXCEEDEDInput exceeds 65KB limit
MAX_DEPTH_EXCEEDEDNesting exceeds 16 levels
BANNED_KEY__proto__, constructor, or prototype in keys
MIXED_SCRIPTHomograph attack detected in tags