MCPcopy Index your code
hub / github.com/callstack/agent-device / defineExecutableCommand

Function defineExecutableCommand

src/commands/command-contract.ts:46–55  ·  view source on GitHub ↗
(
  metadata: CommandMetadata<Name, Input>,
  run: (client: AgentDeviceClient, input: Input) => Promise<Result>,
)

Source from the content-addressed store, hash-verified

44}
45
46export function defineExecutableCommand<Name extends string, Input, Result>(
47 metadata: CommandMetadata<Name, Input>,
48 run: (client: AgentDeviceClient, input: Input) => Promise<Result>,
49): ExecutableCommandContract<Name, Input, Result> {
50 return {
51 ...metadata,
52 run,
53 invoke: async (client, input) => await run(client, metadata.readInput(input)),
54 };
55}

Callers 15

index.tsFile · 0.90
index.tsFile · 0.90
index.tsFile · 0.90
diff.tsFile · 0.90
wait.tsFile · 0.90
screenshot.tsFile · 0.90
alert.tsFile · 0.90
snapshot.tsFile · 0.90
settings.tsFile · 0.90
index.tsFile · 0.90
index.tsFile · 0.90
index.tsFile · 0.90

Calls 1

runFunction · 0.50

Tested by

no test coverage detected