Member Junction
    Preparing search index...

    TaskGraph.Submit — validate and durably persist a graph, returning immediately.

    Returning before execution is the point: the caller is freed the moment the work is safe, and the dispatcher owns it from there. That is what lets an agent submit a graph over MCP without holding anything open.

    REMAINING LIMITATION (C5/D1): a remote submission does not bind to an agent run. TaskGraphSubmitContext carries AgentRunID, and this input deliberately has no field for it — whether a remote caller's graph should BIND to an agent run (cost rollup, reinvoke routing) is the D1 execution-identity design question, to be decided rather than defaulted. Until then a remote submission records submittedByAgentRunID: null: no cost rollup, and reinvoke degrades to a message. The other two fields the in-process path carries DO ride this operation now — reinvokeDepth (clamped; see below) so the runaway-loop cap counts remote hops, and the R3-3 invocation envelope so data.*/context.* conditions evaluate against the invocation instead of nothing.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    ContractFingerprint: "ro_fp_08cd68d5cfacf880"

    Optional structural contract fingerprint emitted by CodeGen (or set by a hand-authored operation). Automatically forwarded on Execute when the caller didn't override options.contractFingerprint, allowing the server resolver to detect stale client bundles.

    ExecutionMode: "Sync"

    Whether this operation is a plain Sync request/response or a LongRunning run.

    ExposeAsAgentTool?: boolean

    When true, exposes this operation for automatic discovery by MJ AI Agent tool adapters.

    ExposeAsMCPTool?: boolean

    When true, exposes this operation for automatic discovery by MJ MCP server tool adapters.

    OperationKey: "TaskGraph.Submit"

    Stable registry key and wire token for this operation (e.g. RecordProcess.RunNow).

    RequiredScope: "taskgraph:execute"

    Optional API-key scope string (e.g. recordprocess:execute) enforced for API-key / MCP callers by the server resolver. undefined means no scope gate; interactive users remain bounded by their entity permissions. Informational here — the server applies it.

    RequiresSystemUser: false

    When true, the server only permits the system user to invoke this operation.

    ToolDescription?: string

    Human/LLM-readable description when exposed as an Agent or MCP tool.

    ToolInputSchema?: Record<string, RemoteOpToolSchemaValue>

    Optional JSON-Schema object describing TInput when exposed as an Agent or MCP tool.

    Methods

    • Per-operation authorization hook, composed with (and applied after) the framework gates that the server resolver runs. Returns true by default. Override to enforce operation-specific rules against the input, acting user, and server transport context (e.g. context.requestOrigin).

      Parameters

      Returns Promise<boolean>

      True if the operation may proceed.

    • The operation's server-side work. The default throws — a routable operation must supply a body (CodeGen-emitted AI/default plumbing, or a hand-authored override). Implementations must use context.provider / context.user for data access (never new Metadata()), per the multi-provider rule.

      Parameters

      • input: TaskGraphSubmitServerInput

        The typed input payload.

      • provider: IMetadataProvider

        The owning provider for data access.

      • user: UserInfo

        The acting user.

      Returns Promise<TaskGraphSubmitServerOutput>

      The typed output payload.