superagent-skill 0.4.2 → 0.5.1
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 +35 -7
- package/SKILL.md +15 -5
- package/lib/cli.mjs +632 -126
- package/lib/index.mjs +1 -1
- package/lib/{settings-Dud0f9wo.mjs → settings-BwRUbWkx.mjs} +38 -0
- package/package.json +1 -1
- package/prompts/delivery.md +2 -2
- package/prompts/pr-review.md +3 -3
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# superagent
|
|
2
2
|
|
|
3
|
-
An agent that turns requests from GitHub, Feishu, and Twitter/X into tickets, and runs each ticket on the coding agent you choose.
|
|
3
|
+
An agent that turns requests from GitHub, GitLab, Feishu, and Twitter/X into tickets, and runs each ticket on the coding agent you choose.
|
|
4
4
|
|
|
5
5
|
- **No web panel.** State is JSON files under `stateDir`, so `ls` and `cat` answer what a dashboard would.
|
|
6
6
|
- **No vendor lock-in.** The executor is a configuration value: `claude`, `codex` or `opencode`, behind one interface.
|
|
@@ -29,8 +29,9 @@ superagent status
|
|
|
29
29
|
`superagent setup` asks the CLIs that already know the answers, so no id is copied from a web page:
|
|
30
30
|
|
|
31
31
|
```sh
|
|
32
|
-
superagent setup . #
|
|
32
|
+
superagent setup . # the forge in settings.yaml and Feishu, from the CLIs
|
|
33
33
|
superagent setup . github # only the GitHub section
|
|
34
|
+
superagent setup . gitlab # only the GitLab section
|
|
34
35
|
superagent setup . feishu --chat Team # the chat by name instead of id
|
|
35
36
|
superagent setup . --allow alice,bob # who may ask; a Feishu user name becomes an open id
|
|
36
37
|
```
|
|
@@ -93,6 +94,31 @@ Arbitrary polling is not yet wired, so a person runs `poll` under cron or a syst
|
|
|
93
94
|
*/1 * * * * cd /path/to/install && superagent poll . --once >> state/poll.log 2>&1
|
|
94
95
|
```
|
|
95
96
|
|
|
97
|
+
## GitLab, including a self-managed instance
|
|
98
|
+
|
|
99
|
+
A GitLab installation reads the agent account's pending *to-do items* — a mention, a direct address, an assignment or a
|
|
100
|
+
review request — and, when review is on, the project's open merge requests. The report goes back as a note on the issue
|
|
101
|
+
or merge request, and a review can squash-merge the merge request once verification and the review both pass.
|
|
102
|
+
|
|
103
|
+
```yaml
|
|
104
|
+
gitlab:
|
|
105
|
+
host: gitlab.example.com # gitlab.com by default; a port is allowed for a self-managed instance
|
|
106
|
+
project: group/sub/project # the project path, subgroups included
|
|
107
|
+
cli: glab-agent # the CLI that acts as the agent's account; `glab auth login --hostname <host>`
|
|
108
|
+
pollSeconds: 60
|
|
109
|
+
allowed: [alice, bob] # GitLab usernames that may ask for work
|
|
110
|
+
mrReview:
|
|
111
|
+
enabled: true
|
|
112
|
+
pollOpenMrs: true
|
|
113
|
+
verifyCommands: ["npm test"]
|
|
114
|
+
autoMerge: true
|
|
115
|
+
squash: true # GitLab applies its project setting when false
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
One installation serves one forge: `github.enabled` and `gitlab.enabled` cannot both be true, because the worker's git
|
|
119
|
+
credentials and CLI shim bind to one account. A merge request triggers the same review prompt as a pull request, with
|
|
120
|
+
GitLab's words and its `refs/merge-requests/<iid>/head` checkout.
|
|
121
|
+
|
|
96
122
|
## Compare with dsh-superagent
|
|
97
123
|
|
|
98
124
|
[`docs/dsh-superagent-comparison.md`](docs/dsh-superagent-comparison.md)([中文版](docs/dsh-superagent-comparison.zh.md))
|
|
@@ -107,9 +133,11 @@ for how superagent incorporates the five core primitives from Anthropic's [*"Bui
|
|
|
107
133
|
## Status
|
|
108
134
|
|
|
109
135
|
Done and tested: the domain, file-backed state, the settings file, three agent runners (verified against the real CLIs),
|
|
110
|
-
the GitHub notification poller, the
|
|
111
|
-
agent's report back to the conversation. The Feishu path is
|
|
112
|
-
against a real Feishu bot
|
|
136
|
+
the GitHub notification poller, the GitLab Source (to-dos, merge request review and merge), the Feishu Source, worktree
|
|
137
|
+
creation per ticket, the round loop, and delivery of the agent's report back to the conversation. The Feishu path is
|
|
138
|
+
proven with a stand-in `lark-cli` and once end to end against a real Feishu bot; the GitLab path is proven with a
|
|
139
|
+
stand-in `glab` and on GitLab 19.4.3 (`gitlab.sitinai.com`): an issue to-do became a ticket and a note, and a merge
|
|
140
|
+
request was reviewed, squash-merged and answered.
|
|
113
141
|
|
|
114
142
|
## Install once
|
|
115
143
|
|
|
@@ -129,8 +157,8 @@ ln -sf "$PWD/bin/superagent.js" ~/.local/bin/superagent # a directory on PATH
|
|
|
129
157
|
Start the loop from that directory: `superagent poll` keeps running, and `superagent poll --once` runs one round, which
|
|
130
158
|
is what a cron entry calls each minute.
|
|
131
159
|
|
|
132
|
-
`checkout` names the repository the tickets change, and `executor.agent` names the coding agent.
|
|
133
|
-
|
|
160
|
+
`checkout` names the repository the tickets change, and `executor.agent` names the coding agent. The Sources are
|
|
161
|
+
optional, but at least one must be on; `github` and `gitlab` cannot both be, because one installation serves one forge.
|
|
134
162
|
|
|
135
163
|
## Tests
|
|
136
164
|
|
package/SKILL.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: superagent
|
|
3
|
-
description: Run an agent that turns requests from GitHub issues, Feishu chats, or Twitter/X mentions into tickets and executes each ticket on a configurable coding agent (Claude Code, Codex, opencode). Use when the user wants an agent to watch a repository, a chat, or Twitter keywords, act on @ mentions, and record its work as plain files instead of a dashboard; when they ask what superagent has done, which tickets are open, or to change which coding agent runs tickets.
|
|
3
|
+
description: Run an agent that turns requests from GitHub issues, GitLab to-dos and merge requests, Feishu chats, or Twitter/X mentions into tickets and executes each ticket on a configurable coding agent (Claude Code, Codex, opencode). Use when the user wants an agent to watch a repository, a project, a chat, or Twitter keywords, act on @ mentions, and record its work as plain files instead of a dashboard; when they ask what superagent has done, which tickets are open, or to change which coding agent runs tickets.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Superagent
|
|
7
7
|
|
|
8
|
-
Superagent listens to GitHub and Feishu. A request that names the agent becomes a **ticket**. Each ticket runs on a
|
|
8
|
+
Superagent listens to GitHub, GitLab and Feishu. A request that names the agent becomes a **ticket**. Each ticket runs on a
|
|
9
9
|
coding agent you choose, in its own worktree, and records itself as files on disk. When the agent reports it is done,
|
|
10
10
|
the summary goes back as a reply in the conversation that asked.
|
|
11
11
|
|
|
@@ -71,6 +71,11 @@ github:
|
|
|
71
71
|
repository: owner/name
|
|
72
72
|
cli: gh-agent # the CLI that acts as the agent's account
|
|
73
73
|
allowed: [alice] # GitHub logins
|
|
74
|
+
gitlab:
|
|
75
|
+
host: gitlab.com # or a self-managed host, optionally with a port
|
|
76
|
+
project: group/project
|
|
77
|
+
cli: glab-agent # the CLI that acts as the agent's account on that host
|
|
78
|
+
allowed: [alice] # GitLab usernames
|
|
74
79
|
feishu:
|
|
75
80
|
cli: lark-bot # the CLI that acts as the bot
|
|
76
81
|
chats: [{ chatId: oc_..., name: Team }]
|
|
@@ -83,6 +88,9 @@ twitter:
|
|
|
83
88
|
allowed: [] # empty accepts any user matching query
|
|
84
89
|
```
|
|
85
90
|
|
|
91
|
+
One installation serves one forge: turn off either `github.enabled` or `gitlab.enabled`. The worker's git credentials and
|
|
92
|
+
CLI shims bind to one account, so a second forge would share them.
|
|
93
|
+
|
|
86
94
|
The agent acts only as the accounts those CLIs are signed in to. Never point `cli` at a personal login: everything the
|
|
87
95
|
agent writes would appear under that person's name.
|
|
88
96
|
|
|
@@ -157,12 +165,12 @@ In autonomous runs (unaddressed messages, timers, watchers), tools are automatic
|
|
|
157
165
|
| Command | Does |
|
|
158
166
|
| --- | --- |
|
|
159
167
|
| `superagent init [dir]` | create `settings.yaml` and the state directory; a second run keeps both |
|
|
160
|
-
| `superagent setup [dir] [github\|feishu] [--allow a,b] [--chat id\|name]` | fill the
|
|
168
|
+
| `superagent setup [dir] [github\|gitlab\|feishu] [--allow a,b] [--chat id\|name]` | fill the Source sections from the configured CLIs; a CLI that cannot answer changes nothing and exits 1 |
|
|
161
169
|
| `superagent status [dir]` | print open and ended tickets, and the recent judgements of unaddressed messages, as Markdown |
|
|
162
|
-
| `superagent doctor [dir]` | show installed agents
|
|
170
|
+
| `superagent doctor [dir]` | show installed agents, the selected one, and the Source project |
|
|
163
171
|
| `superagent agents` | list the agent names a configuration may use |
|
|
164
172
|
| `superagent run [dir] -p <text>` | run one prompt on the configured agent and print its report |
|
|
165
|
-
| `superagent poll [dir] [--once]` | read
|
|
173
|
+
| `superagent poll [dir] [--once]` | read the Source's to-dos or notifications, accept them as tickets, and run them |
|
|
166
174
|
|
|
167
175
|
The first argument is the installation directory and defaults to the current directory.
|
|
168
176
|
|
|
@@ -176,6 +184,8 @@ The first argument is the installation directory and defaults to the current dir
|
|
|
176
184
|
| `Selected: **x** — not installed` | Install that CLI or choose another `executor.agent`. |
|
|
177
185
|
| A ticket ends with a failed report | Read `state/tickets/<id>/log.md`; the agent's last message is at the end. |
|
|
178
186
|
| Nothing happens after a mention | Check the author is on the allow list and `enabled` is true for that Source. |
|
|
187
|
+
| `glab ... 404` or a project not found | `gitlab.project` is the path, not the numeric id; `host` must name the instance `glab` is signed in to. |
|
|
188
|
+
| `one installation serves one forge` | Set `github.enabled` or `gitlab.enabled` to false; the worker's credentials bind to one account. |
|
|
179
189
|
|
|
180
190
|
## Going further
|
|
181
191
|
|