• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

kshard / thinker / 15082283232

17 May 2025 05:53AM UTC coverage: 33.807% (-24.4%) from 58.222%
15082283232

Pull #20

github

fogfish
establish agent taxonomy - prompter, manifold, automata
Pull Request #20: establish agent taxonomy - prompter, manifold, automata

241 of 611 new or added lines in 28 files covered. (39.44%)

145 existing lines in 5 files now uncovered.

381 of 1127 relevant lines covered (33.81%)

0.36 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/command.go
1
//
2
// Copyright (C) 2025 Dmitry Kolesnikov
3
//
4
// This file may be modified and distributed under the terms
5
// of the MIT license.  See the LICENSE file for details.
6
// https://github.com/kshard/thinker
7
//
8

9
package thinker
10

11
import (
12
        "encoding/json"
13
)
14

15
// A Command defines an external tool or utility available to the agent for task-solving.
16
// To ensure usability, each command must include a usage definition and description.
17
type Cmd struct {
18
        // [Required] A unique name for the command, used as a reference by LLMs (e.g., "bash").
19
        Cmd string
20

21
        // [Required] A description of the command and its purpose.
22
        // Used to define the command registry for LLMs.
23
        About string
24

25
        // [Required] Concise instructions on the command's syntax.
26
        // For example: "bash <command>".
27
        Syntax string
28

29
        // [Optional] Specifies arguments, types, and additional context to guide
30
        // the LLM on command syntax.
31
        Args []Arg
32

33
        // The actual command execution function, which can be defined statically or
34
        // dynamically upon registration.
35
        Run func(json.RawMessage) ([]byte, error)
36
}
37

38
type Arg struct {
39
        Name  string `json:"-"`
40
        Type  string `json:"type"`
41
        About string `json:"description"`
42
}
43

NEW
44
func (cmd Cmd) IsValid() bool {
×
NEW
45
        return len(cmd.Cmd) != 0 && len(cmd.About) != 0 && cmd.Run != nil
×
UNCOV
46
}
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc