MCPcopy Create free account
hub / github.com/apache/maka / integerTuple

Function integerTuple

packages/core/src/computer-use.ts:588–593  ·  view source on GitHub ↗

Integers only, so a mistyped `coordinate` still degrades to a shape.

(value: unknown)

Source from the content-addressed store, hash-verified

586
587/** Integers only, so a mistyped `coordinate` still degrades to a shape. */
588function integerTuple(value: unknown): readonly number[] | undefined {
589 if (!Array.isArray(value) || value.length === 0 || value.length > 4) return undefined;
590 return value.every((entry) => typeof entry === 'number' && Number.isInteger(entry))
591 ? [...(value as number[])]
592 : undefined;
593}
594
595/**
596 * A screen-derived or typed argument, kept as a shape.

Callers 1

computerUseModelCallArgsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected