NAME
Skilletor::Probe - The probe of `skilletor add` for a generic host – git ls-remote, then a HEAD on the tarball
VERSION
version 0.008000
SYNOPSIS
use Skilletor::Probe qw( make_probe );
use Skilletor::Spec qw( resolve_spec );
my $r = resolve_spec( 'skills.example.org/team', make_probe() );
# { kind => 'git', value => 'https://skills.example.org/team', ... } when git answers there,
# { kind => 'url', value => 'https://skills.example.org/team.tar.gz', ... } when the tarball does
DESCRIPTION
The reference's src/probe.ts (spec §4.2): what skilletor add asks a generic host – a host.tld[/path] spec – before it writes the source. First git ls-remote -- <url>, no shell, in Skilletor::GitEnv's environment, stdin on /dev/null, ended after the timeout; then a HEAD on <url>.tar.gz, which counts when it answers 2xx after up to 20 redirects. Neither is an error: the probe answers what it found, and "resolve_spec" in Skilletor::Spec words the refusal.
The HEAD runs in this process through HTTP::Tiny (TLS through IO::Socket::SSL, certificates verified), where the reference starts a short Node child for it – a packed binary needs no other program than git. Its timeout is HTTP::Tiny's, per connect and read, not one for the whole request.
make_probe
my $probe = make_probe();
my $probe = make_probe( timeout_ms => 5000, http => HTTP::Tiny->new(...) );
A code reference for "resolve_spec" in Skilletor::Spec: called with the base URL, it returns { git => 1 }, { tarball => 1 } or {}. timeout_ms (default 5000) bounds the ls-remote and is the HEAD's timeout; http replaces the HTTP::Tiny agent, for a test.
SUPPORT
Issues
Please report bugs and feature requests at https://github.com/Getty/skilletor/issues.
CONTRIBUTING
Contributions are welcome! Please fork the repository and submit a pull request.
AUTHOR
Torsten Raudssus <torsten@raudssus.de>
COPYRIGHT AND LICENSE
This software is Copyright (c) 2026 by Torsten Raudssus <torsten@raudssus.de> https://raudssus.de/.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)