Skip to content

@graphty/graphty-element / session / AlgorithmRunCommand

Interface: AlgorithmRunCommand ​

Defined in: graphty-element/src/session/planning.ts:57

Start one algorithm, as data.

Every verb on a session is expressible as a command, so that "do this" and "record that you did this" are the same artifact -- what session.execute runs, what a transaction groups into one undoable step, and what an agent's tool call carries. This is the one that starts a run; SessionCommand is the union of all of them.

Properties ​

algorithm ​

readonly algorithm: AlgorithmKey

Defined in: graphty-element/src/session/planning.ts:61

Which algorithm to run.


applySuggestedStyles? ​

readonly optional applySuggestedStyles?: boolean

Defined in: graphty-element/src/session/planning.ts:78

Also apply the layers the run suggests, on top of the stack, in the same step as the run: one undo takes the run and those layers away together.


as? ​

readonly optional as?: string

Defined in: graphty-element/src/session/planning.ts:73

The id to give the run. Required for anything that will be saved.


exact? ​

readonly optional exact?: boolean

Defined in: graphty-element/src/session/planning.ts:71

Refuse to approximate: above the cost cap this fails rather than sampling.


op ​

readonly op: "algo.run"

Defined in: graphty-element/src/session/planning.ts:59

Which verb this is.


params? ​

readonly optional params?: Readonly<Record<string, unknown>>

Defined in: graphty-element/src/session/planning.ts:63

Its parameters.


sample? ​

readonly optional sample?: number

Defined in: graphty-element/src/session/planning.ts:69

Ask for the approximate method at a chosen sample size.


scope? ​

readonly optional scope?: Scope

Defined in: graphty-element/src/session/planning.ts:65

What it may look at. Defaults to the visible graph.


seed? ​

readonly optional seed?: number

Defined in: graphty-element/src/session/planning.ts:67

The seed for a randomised or sampled method.