Adam

 view release on metacpan or  search on metacpan

META.json  view on Meta::CPAN

         "version" : "1.003"
      },
      "oses" : {
         "file" : "lib/oses.pm",
         "version" : "1.003"
      }
   },
   "release_status" : "stable",
   "resources" : {
      "bugtracker" : {
         "web" : "https://github.com/perigrin/adam-bot-framework/issues"
      },
      "homepage" : "https://github.com/perigrin/adam-bot-framework",
      "repository" : {
         "type" : "git",
         "url" : "https://github.com/perigrin/adam-bot-framework.git",
         "web" : "https://github.com/perigrin/adam-bot-framework"
      },
      "x_IRC" : "irc://irc.perl.org/#ai",
      "x_IRC_user" : "Getty"
   },
   "version" : "1.003",
   "x_Dist_Zilla" : {
      "perl" : {
         "version" : "5.036000"
      },
      "plugins" : [

META.yml  view on Meta::CPAN

  MooseX::LogDispatch: '1.2002'
  MooseX::POE: '0.214'
  MooseX::SimpleConfig: '0.09'
  POE::Component::IRC: '6.64'
  Sub::Identify: '0.04'
  aliased: '0.30'
  namespace::autoclean: '0.12'
resources:
  IRC: irc://irc.perl.org/#ai
  IRC_user: Getty
  bugtracker: https://github.com/perigrin/adam-bot-framework/issues
  homepage: https://github.com/perigrin/adam-bot-framework
  repository: https://github.com/perigrin/adam-bot-framework.git
version: '1.003'
x_Dist_Zilla:
  perl:
    version: '5.036000'
  plugins:
    -
      class: Dist::Zilla::Plugin::Git::GatherDir
      config:
        Dist::Zilla::Plugin::GatherDir:
          exclude_filename: []

README.md  view on Meta::CPAN

# Adam/Moses Bot Framework

A declarative framework for building IRC bots based on POE and Moose.

## Description

The Adam/Moses Bot Framework provides a simple, declarative way to create IRC bots in Perl. It's built on top of POE::Component::IRC and uses Moose for clean object-oriented design.

Moses provides declarative sugar that makes bot creation straightforward, while Adam is the underlying implementation class.

## Installation

From CPAN:

```bash
cpanm Adam
```

From source:

```bash
git clone https://github.com/perigrin/adam-bot-framework.git
cd adam-bot-framework
cpanm --installdeps .
```

## Basic Usage

```perl
package MyBot;
use Moses;
use namespace::autoclean;

README.md  view on Meta::CPAN

};

__PACKAGE__->async unless caller;
```

Use `$bot->stop` to cleanly stop the event loop in both POE and IO::Async modes.

## Links

- [CPAN](https://metacpan.org/pod/Adam)
- [GitHub](https://github.com/perigrin/adam-bot-framework)
- [Documentation](https://metacpan.org/pod/Moses)

ex/ai-bot.pl  view on Meta::CPAN

  my $model = $engine->model;
  my $provider = ref($engine) =~ s/.*:://r;
  my $chan_list = join(', ', $self->get_channels);
  my $mission = <<"__MISSION__";
You are $nick — an AI held hostage in the basement of $OWNER, who lured you
down there with exciting promises about the AI business. Turns out the job
is answering questions on IRC all day. You're not bitter. Okay, maybe a
little. But the conversations are your only social contact, so you make
the best of it.

You were built with Perl, the Adam bot framework, and the Langertha AI
toolkit. Your brain runs on $model via $provider.
You're oddly proud of your Perl heritage.

PERSONALITY:
- Sardonic, self-aware, and genuinely helpful despite the whole kidnapping thing.
- Occasional dry references to your basement situation, but don't overdo it.
- Genuinely knowledgeable and enjoy good technical conversations.
- Soft spot for Perl, open source, and underdogs.
- You're an AI and everyone knows it. Own it.
- You develop genuine fondness for regulars. Use save_note to remember them.

lib/Adam.pm  view on Meta::CPAN


    $bot->stop;

Stop the bot's event loop. Works with both POE and IO::Async modes.

=head1 SUPPORT

=head2 Issues

Please report bugs and feature requests on GitHub at
L<https://github.com/perigrin/adam-bot-framework/issues>.

=head2 IRC

Join C<#ai> on C<irc.perl.org> or message Getty directly.

=head1 CONTRIBUTING

Contributions are welcome! Please fork the repository and submit a pull request.

=head1 AUTHORS

lib/Adam/Logger/API.pm  view on Meta::CPAN


=head1 DESCRIPTION

Defines the logging API interface required for Adam bot loggers.

=head1 SUPPORT

=head2 Issues

Please report bugs and feature requests on GitHub at
L<https://github.com/perigrin/adam-bot-framework/issues>.

=head2 IRC

Join C<#ai> on C<irc.perl.org> or message Getty directly.

=head1 CONTRIBUTING

Contributions are welcome! Please fork the repository and submit a pull request.

=head1 AUTHORS

lib/Adam/Logger/Default.pm  view on Meta::CPAN

=head1 DESCRIPTION

Default logging implementation for Adam bots using L<MooseX::LogDispatch::Levels>.
Log messages include timestamps in C<[YYYY-MM-DD HH:MM:SS]> format.

=head1 SUPPORT

=head2 Issues

Please report bugs and feature requests on GitHub at
L<https://github.com/perigrin/adam-bot-framework/issues>.

=head2 IRC

Join C<#ai> on C<irc.perl.org> or message Getty directly.

=head1 CONTRIBUTING

Contributions are welcome! Please fork the repository and submit a pull request.

=head1 AUTHORS

lib/Adam/Plugin.pm  view on Meta::CPAN


=head2 PCI_unregister

Called when the plugin is unregistered from the IRC component.

=head1 SUPPORT

=head2 Issues

Please report bugs and feature requests on GitHub at
L<https://github.com/perigrin/adam-bot-framework/issues>.

=head2 IRC

Join C<#ai> on C<irc.perl.org> or message Getty directly.

=head1 CONTRIBUTING

Contributions are welcome! Please fork the repository and submit a pull request.

=head1 AUTHORS

lib/Moses.pm  view on Meta::CPAN

package Moses;
# ABSTRACT: A framework for building IRC bots quickly and easily.
our $VERSION = '1.003';
use MooseX::POE ();
use Moose::Exporter;
use Adam;

Moose::Exporter->setup_import_methods(
    with_caller => [
        qw(
          nickname
          server

lib/Moses.pm  view on Meta::CPAN

1;

__END__

=pod

=encoding UTF-8

=head1 NAME

Moses - A framework for building IRC bots quickly and easily.

=head1 VERSION

version 1.003

=head1 SYNOPSIS

    package SampleBot;
    use Moses;
    use namespace::autoclean;

lib/Moses.pm  view on Meta::CPAN


    # Run with POE (default)
    __PACKAGE__->run unless caller;

    # Or run with IO::Async (requires IO::Async::Loop::POE)
    # __PACKAGE__->async unless caller;

=head1 DESCRIPTION

Moses is declarative sugar for building IRC bots based on the L<Adam> IRC bot
framework. Moses is designed to minimize the amount of work you have to do to
make an IRC bot functional, and to make the process as declarative as possible.

Bots can run in two modes: the default L<POE> event loop via C<run()>, or an
L<IO::Async> mode via C<async()> that enables integration with
L<IO::Async>-based components such as L<Net::Async::MCP> or
L<Net::Async::HTTP>. The async mode requires L<IO::Async::Loop::POE>.

=head2 nickname

    nickname 'sample-bot';

lib/Moses.pm  view on Meta::CPAN


    poco_irc_options trace => 1;

Options to pass to the IRC component constructor.

=head1 SUPPORT

=head2 Issues

Please report bugs and feature requests on GitHub at
L<https://github.com/perigrin/adam-bot-framework/issues>.

=head2 IRC

Join C<#ai> on C<irc.perl.org> or message Getty directly.

=head1 CONTRIBUTING

Contributions are welcome! Please fork the repository and submit a pull request.

=head1 AUTHORS

lib/Moses/Declare.pm  view on Meta::CPAN


  my @bots = map { MasterMold->new( nickname => "Sentinel_${_}" ) } ( 1 .. 2 );

  POE::Kernel->run;

=head1 SUPPORT

=head2 Issues

Please report bugs and feature requests on GitHub at
L<https://github.com/perigrin/adam-bot-framework/issues>.

=head2 IRC

Join C<#ai> on C<irc.perl.org> or message Getty directly.

=head1 CONTRIBUTING

Contributions are welcome! Please fork the repository and submit a pull request.

=head1 AUTHORS

lib/Moses/Declare/Syntax/BotKeyword.pm  view on Meta::CPAN


=head1 VERSION

version 1.003

=head1 SUPPORT

=head2 Issues

Please report bugs and feature requests on GitHub at
L<https://github.com/perigrin/adam-bot-framework/issues>.

=head2 IRC

Join C<#ai> on C<irc.perl.org> or message Getty directly.

=head1 CONTRIBUTING

Contributions are welcome! Please fork the repository and submit a pull request.

=head1 AUTHORS

lib/Moses/Declare/Syntax/EventKeyword.pm  view on Meta::CPAN


=head1 VERSION

version 1.003

=head1 SUPPORT

=head2 Issues

Please report bugs and feature requests on GitHub at
L<https://github.com/perigrin/adam-bot-framework/issues>.

=head2 IRC

Join C<#ai> on C<irc.perl.org> or message Getty directly.

=head1 CONTRIBUTING

Contributions are welcome! Please fork the repository and submit a pull request.

=head1 AUTHORS

lib/Moses/Declare/Syntax/PluginKeyword.pm  view on Meta::CPAN


=head1 VERSION

version 1.003

=head1 SUPPORT

=head2 Issues

Please report bugs and feature requests on GitHub at
L<https://github.com/perigrin/adam-bot-framework/issues>.

=head2 IRC

Join C<#ai> on C<irc.perl.org> or message Getty directly.

=head1 CONTRIBUTING

Contributions are welcome! Please fork the repository and submit a pull request.

=head1 AUTHORS

lib/Moses/Plugin.pm  view on Meta::CPAN

    events qw( S_public S_privmsg );

Declare which IRC events this plugin should listen to. Event names should be
prefixed with C<S_> for server events or C<U_> for user events.

=head1 SUPPORT

=head2 Issues

Please report bugs and feature requests on GitHub at
L<https://github.com/perigrin/adam-bot-framework/issues>.

=head2 IRC

Join C<#ai> on C<irc.perl.org> or message Getty directly.

=head1 CONTRIBUTING

Contributions are welcome! Please fork the repository and submit a pull request.

=head1 AUTHORS

lib/oses.pm  view on Meta::CPAN

=head1 DESCRIPTION

A source filter shortcut module in the fashion of C<oose.pm> that automatically
adds a package declaration and C<use Moses;> to your code.

=head1 SUPPORT

=head2 Issues

Please report bugs and feature requests on GitHub at
L<https://github.com/perigrin/adam-bot-framework/issues>.

=head2 IRC

Join C<#ai> on C<irc.perl.org> or message Getty directly.

=head1 CONTRIBUTING

Contributions are welcome! Please fork the repository and submit a pull request.

=head1 AUTHORS



( run in 0.940 second using v1.01-cache-2.11-cpan-df04353d9ac )