this.me
    Preparing search index...

    Interface OperatorHandler

    interface OperatorHandler {
        match(call: OperatorCall, kernel: OperatorKernel): OperatorMatch;
        execute(
            match: {
                matched: true;
                token: string;
                kind: OperatorKind;
                targetPath: SemanticPath;
                rewrittenExpression?: any;
                memoryOperator?: string;
                returnsValueAtRoot?: boolean;
            },
            call: OperatorCall,
            kernel: OperatorKernel,
        ): any;
    }
    Index

    Methods

    Methods

    • Execute behavior. This function may:

      • mutate kernel config (define operator)
      • write memories / encrypt branches / update secrets/noises
      • return a value (root eval/query) or a Memory

      Parameters

      • match: {
            matched: true;
            token: string;
            kind: OperatorKind;
            targetPath: SemanticPath;
            rewrittenExpression?: any;
            memoryOperator?: string;
            returnsValueAtRoot?: boolean;
        }
        • matched: true
        • token: string

          The operator token that matched (e.g. "_", "=")

        • kind: OperatorKind

          The operator kind from the registry

        • targetPath: SemanticPath

          The destination path that should receive the semantic write (operator leaf removed or otherwise transformed). In me.ts this is typically scope.

        • OptionalrewrittenExpression?: any

          The expression to write after the operator transforms it. e.g. pointer operator turns expression:string into {__ptr:string}

        • OptionalmemoryOperator?: string

          If operator is producing a semantic memory, what should be recorded as operator. (me.ts uses "" for both "" and "->" pointer calls).

        • OptionalreturnsValueAtRoot?: boolean

          Some operators return a value instead of writing when invoked at root.

          • root "=" thunk returns computed value
          • root "?" returns collected/transformed output
      • call: OperatorCall
      • kernel: OperatorKernel

      Returns any