@dxos/compute - v0.16.0
    Preparing search index...

    Interface InvokeOptions

    Options for operation invocation.

    interface InvokeOptions {
        conversation?: URI;
        notify?: {
            error?:
                | string
                | [string, { count?: number; defaultValue?: string; ns: string }];
            start?:
                | string
                | [string, { count?: number; defaultValue?: string; ns: string }];
            success?:
                | string
                | [string, { count?: number; defaultValue?: string; ns: string }];
        };
        on?: "edge"
        | "local";
        spaceId?: SpaceId;
        tracing?: {
            conversation?: Ref<Unknown>;
            parentPid?: string;
            parentThread?: string;
            pid?: string;
            processName?: string;
            runId?: string;
            runtimeName?: string & Brand<"@dxos/compute/Trace/RuntimeName">;
            space?: string;
            thread?: string;
            toolCallId?: string;
            trigger?: Ref<Trigger.Trigger & OfKind<Object> & Unknown>;
        };
    }
    Index

    Properties

    conversation?: URI

    URI of the conversation feed (queue) — today always an EID, but typed as URI.URI to accommodate future entity-kind extensions. Narrow with EID.parse at the point of use. Passed to the process environment so nested operations can resolve HarnessService and related services.

    notify?: {
        error?:
            | string
            | [string, { count?: number; defaultValue?: string; ns: string }];
        start?:
            | string
            | [string, { count?: number; defaultValue?: string; ns: string }];
        success?:
            | string
            | [string, { count?: number; defaultValue?: string; ns: string }];
    }

    Request user-facing notifications at the given invocation phases.

    Type declaration

    • Optional Readonlyerror?: string | [string, { count?: number; defaultValue?: string; ns: string }]

      Shown when the invocation fails.

    • Optional Readonlystart?: string | [string, { count?: number; defaultValue?: string; ns: string }]

      Shown when the invocation starts.

    • Optional Readonlysuccess?: string | [string, { count?: number; defaultValue?: string; ns: string }]

      Shown when the invocation succeeds.

    on?: "edge" | "local"

    Specifies the runtime environment for the operation. By default, the operation is executed on the local runtime.

    spaceId?: SpaceId

    Space ID to provide database context for the handler.

    tracing?: {
        conversation?: Ref<Unknown>;
        parentPid?: string;
        parentThread?: string;
        pid?: string;
        processName?: string;
        runId?: string;
        runtimeName?: string & Brand<"@dxos/compute/Trace/RuntimeName">;
        space?: string;
        thread?: string;
        toolCallId?: string;
        trigger?: Ref<Trigger.Trigger & OfKind<Object> & Unknown>;
    }

    Tracing metadata stamped on the process that runs the invocation.

    Type declaration

    • Optional Readonlyconversation?: Ref<Unknown>

      Ref to the conversation feed object if present.

    • Optional ReadonlyparentPid?: string
    • Optional ReadonlyparentThread?: string

      Light thread of the parent process's turn that spawned this process.

    • Optional Readonlypid?: string
    • Optional ReadonlyprocessName?: string
    • Optional ReadonlyrunId?: string

      Pid of the first invocation of the run this message belongs to. A run that calls Operation.runAgain() continues in a new invocation with its own pid; each continuation carries the first invocation's pid here so consumers can show the run as one unit. Absent on the first invocation, whose own pid is the run's id.

    • Optional ReadonlyruntimeName?: string & Brand<"@dxos/compute/Trace/RuntimeName">

      Extensible name informing which runtime executed the code that produced the event.

    • Optional Readonlyspace?: string

      Space the message was produced in. Stored as a string to avoid circular dependency on @dxos/keys.

    • Optional Readonlythread?: string

      Lane of the process's turn that produced the event (see CurrentThread).

    • Optional ReadonlytoolCallId?: string

      ID of the tool call that created the current process.

    • Optional Readonlytrigger?: Ref<Trigger.Trigger & OfKind<Object> & Unknown>

      Ref to the trigger object if invocation resulted from a trigger.