#!/usr/bin/env perl

use strict;
use warnings;

use File::Basename qw(basename);
use File::Spec;
use FindBin qw($Bin);

my $command = basename($0);
my $core = File::Spec->catfile( $Bin, '_dashboard-core' );
exec { $^X } $^X, $core, $command, @ARGV;
die "Unable to exec $core for $command: $!";

__END__

=pod

=head1 NAME

housekeeper - private built-in command wrapper for Developer Dashboard

=head1 SYNOPSIS

  dashboard housekeeper

=head1 DESCRIPTION

This private helper is staged under F<~/.developer-dashboard/cli/dd/> so the
public C<dashboard> entrypoint can stay a thin switchboard.

=for comment FULL-POD-DOC START

=head1 PURPOSE

This staged helper exposes the built-in temp-state cleanup command. It gives
the public runtime one stable way to run the shared temp housekeeper logic.

=head1 WHY IT EXISTS

It exists because temp cleanup is built-in dashboard behavior, but the public
entrypoint still has to remain a thin dispatcher that hands real work off to
private helpers and modules.

=head1 WHEN TO USE

Use this file when changing the public C<dashboard housekeeper> command route
or when fixing how the cleanup helper is staged into the home runtime.

=head1 HOW TO USE

Users run C<dashboard housekeeper>. The staged helper forwards the request to
the private runtime, which loads the cleanup module and prints the JSON
summary.

=head1 WHAT USES IT

It is used by developers inspecting temp cleanup, by the built-in
C<housekeeper> collector job, and by CLI regression tests.

=head1 EXAMPLES

Example 1:

  dashboard housekeeper

Run the public built-in command path that stages or re-enters this helper.

Example 2:

  ~/.developer-dashboard/cli/dd/housekeeper

Inspect the staged helper directly after C<dashboard init> or helper
extraction has populated the home runtime.

Example 3:

  dashboard collector run housekeeper

Run the built-in collector that executes this helper through the collector
runtime.

Example 4:

  prove -lv t/05-cli-smoke.t t/30-dashboard-loader.t

Rerun the focused staged-helper and thin-loader tests after changing helper
dispatch behavior.


=for comment FULL-POD-DOC END

=cut
