superagent-skill 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -5
- package/SKILL.md +22 -1
- package/lib/cli.mjs +489 -259
- package/lib/index.mjs +2 -2
- package/lib/{settings-BewLFAqT.mjs → settings-D0qG6Mo8.mjs} +274 -11
- package/package.json +4 -3
- package/prompts/delivery.md +4 -0
- package/prompts/scope.md +5 -0
package/README.md
CHANGED
|
@@ -69,25 +69,42 @@ A round reads the agent account's GitHub notifications, keeps the ones for `gith
|
|
|
69
69
|
`github.allowed`, builds a Trigger for each mention, and accepts it as a ticket. The ticket runs on
|
|
70
70
|
`executor.agent`; its report is written under `stateDir/work/<ticket>/.superagent/log.md`.
|
|
71
71
|
|
|
72
|
+
A message in a chat the bot reads that names no one is assessed by one `claude -p` call per message, against the
|
|
73
|
+
`policy.rules` in `settings.yaml`. In `observe` mode the verdict is recorded and no ticket starts; `auto` accepts the
|
|
74
|
+
ones the assessor matches. `superagent status` lists the recent judgements.
|
|
75
|
+
|
|
72
76
|
Arbitrary polling is not yet wired, so a person runs `poll` under cron or a systemd timer:
|
|
73
77
|
|
|
74
78
|
```cron
|
|
75
79
|
*/1 * * * * cd /path/to/install && superagent poll . --once >> state/poll.log 2>&1
|
|
76
80
|
```
|
|
77
81
|
|
|
82
|
+
## Compare with dsh-superagent
|
|
83
|
+
|
|
84
|
+
[`docs/dsh-superagent-comparison.md`](docs/dsh-superagent-comparison.md)([中文版](docs/dsh-superagent-comparison.zh.md))
|
|
85
|
+
compares this project with the earlier `dsh-superagent` DSH bundle: what both keep, what each does differently, and where
|
|
86
|
+
this one is behind.
|
|
87
|
+
|
|
78
88
|
## Status
|
|
79
89
|
|
|
80
90
|
Done and tested: the domain, file-backed state, the settings file, three agent runners (verified against the real CLIs),
|
|
81
91
|
the GitHub notification poller, the Feishu Source, worktree creation per ticket, the round loop, and delivery of the
|
|
82
|
-
agent's report back to the conversation. The Feishu path is proven with a stand-in `lark-cli
|
|
83
|
-
|
|
92
|
+
agent's report back to the conversation. The Feishu path is proven with a stand-in `lark-cli` and once end to end
|
|
93
|
+
against a real Feishu bot.
|
|
84
94
|
|
|
85
95
|
## Install once
|
|
86
96
|
|
|
87
97
|
```sh
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
98
|
+
npm install -g superagent-skill
|
|
99
|
+
superagent init ~/my-superagent && cd ~/my-superagent
|
|
100
|
+
superagent doctor
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
From a checkout instead, build it and link it yourself:
|
|
104
|
+
|
|
105
|
+
```sh
|
|
106
|
+
pnpm install && pnpm build
|
|
107
|
+
ln -sf "$PWD/bin/superagent.js" ~/.local/bin/superagent # a directory on PATH
|
|
91
108
|
```
|
|
92
109
|
|
|
93
110
|
Start the loop from that directory: `superagent poll` keeps running, and `superagent poll --once` runs one round, which
|
package/SKILL.md
CHANGED
|
@@ -81,6 +81,27 @@ feishu:
|
|
|
81
81
|
The agent acts only as the accounts those CLIs are signed in to. Never point `cli` at a personal login: everything the
|
|
82
82
|
agent writes would appear under that person's name.
|
|
83
83
|
|
|
84
|
+
### Messages that do not address the agent
|
|
85
|
+
|
|
86
|
+
A message in a chat the bot reads that names no one is assessed, once per message, by one `claude -p` call that prints
|
|
87
|
+
a verdict. Turn this on in `settings.yaml`:
|
|
88
|
+
|
|
89
|
+
```yaml
|
|
90
|
+
policy:
|
|
91
|
+
mode: observe # off, observe, or auto
|
|
92
|
+
rules:
|
|
93
|
+
- id: unasked # the rule that says the message asks for work at all
|
|
94
|
+
name: Request
|
|
95
|
+
instruction: The discussion asks for a concrete change to this project.
|
|
96
|
+
- id: docs
|
|
97
|
+
name: Documentation
|
|
98
|
+
instruction: The change is to a document in the repository.
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
`observe` records what `auto` would accept and starts nothing; `auto` accepts the candidates the assessor matches. The
|
|
102
|
+
`unasked` rule is required for an unaddressed message to start work. `superagent status` lists the recent
|
|
103
|
+
judgements under "Unaddressed messages". Keep `observe` until the judgements read right.
|
|
104
|
+
|
|
84
105
|
## Rules to keep
|
|
85
106
|
|
|
86
107
|
- **Start narrow.** One repository, one chat, one allowed login. Widen after the agent's work looks right.
|
|
@@ -92,7 +113,7 @@ agent writes would appear under that person's name.
|
|
|
92
113
|
| Command | Does |
|
|
93
114
|
| --- | --- |
|
|
94
115
|
| `superagent init [dir]` | create `settings.yaml` and the state directory; a second run keeps both |
|
|
95
|
-
| `superagent status [dir]` | print open and ended tickets as Markdown |
|
|
116
|
+
| `superagent status [dir]` | print open and ended tickets, and the recent judgements of unaddressed messages, as Markdown |
|
|
96
117
|
| `superagent doctor [dir]` | show installed agents and the selected one |
|
|
97
118
|
| `superagent agents` | list the agent names a configuration may use |
|
|
98
119
|
| `superagent run [dir] -p <text>` | run one prompt on the configured agent and print its report |
|