INNER CODE UNIT · TypeScript

targets

Core-Mate/OpenGUI · deepseek-harness-plugin/src/index.ts:502

    const targets = await fleet.resolveConnected(context.targets.map(target => target.id), lease.signal)
    if (targets.length !== context.targets.length || targets.some((target, index) => target.serial !== context.targets[index]?.serial)) {
      throw new Error('coremate-mobile: a phone locked to this task disconnected; reconnect it and submit the task again')
    }
    const startRun = async (executionSignal: AbortSignal): Promise<CoremateTaskResult> => {
      const operation = async (target: FleetDevice, _index: number, childSignal: AbortSignal): Promise<{ target: FleetDevice, result: CoremateTaskResult }> => {
        const child = await ctx.subagents.start('spawn', {
          label: `Control ${target.label}`,
          prompt: [{ type: 'text', text: `Target phone: ${target.label}\n\nTask: ${task}` }],
          parent,
          signal: childSignal,
          agentOptions: context.route,
          maxDepth: 2,
          toolFilter: { allow: ['phone_control'] },
          persona: `You control exactly one fixed Android phone, labeled ${target.label}. Never try to discover, switch, or act on another phone. Observe before the first change. For every mutation, echo the exact current observationId. Tap with a tight targetBBox and swipe with coordinates in current screenshot pixels. Perform exactly one action per phone_control call and inspect the returned observation. Use wait only when the UI is visibly loading; ordinary actions already auto-observe. Never reuse coordinates from an old observation. Stop and report any authorization, device, model, repeated-no-progress, operation-limit, or unsupported-action error.`,
        })
        if (child.localAgent === undefined) {
          await child.dispose()

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…