@holon-run/agentinbox 1.0.2 → 1.0.3
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/dist/src/cli.js +9 -4
- package/package.json +2 -1
- package/skills/README.md +18 -0
- package/skills/agentinbox/SKILL.md +239 -0
- package/skills/agentinbox/agents/openai.yaml +3 -0
package/dist/src/cli.js
CHANGED
|
@@ -53,6 +53,10 @@ async function main() {
|
|
|
53
53
|
await runDaemon(normalized.slice(1));
|
|
54
54
|
return;
|
|
55
55
|
}
|
|
56
|
+
if (hasHelpFlag(normalized.slice(1))) {
|
|
57
|
+
printHelp([command]);
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
56
60
|
const client = await createClient(normalized);
|
|
57
61
|
if (command === "host" && normalized[1] === "add") {
|
|
58
62
|
const [hostType, hostKey] = normalized.slice(2, 4);
|
|
@@ -829,10 +833,6 @@ async function main() {
|
|
|
829
833
|
await printRemote(client, "/gc", {});
|
|
830
834
|
return;
|
|
831
835
|
}
|
|
832
|
-
if (hasHelpFlag(normalized.slice(1))) {
|
|
833
|
-
printHelp([command]);
|
|
834
|
-
return;
|
|
835
|
-
}
|
|
836
836
|
throw new Error(`unknown command: ${normalized.join(" ")}`);
|
|
837
837
|
}
|
|
838
838
|
async function runServe(args) {
|
|
@@ -1300,6 +1300,11 @@ Usage:
|
|
|
1300
1300
|
|
|
1301
1301
|
Usage:
|
|
1302
1302
|
agentinbox follow <providerOrKind> <template> [--agent-id ID] [--args-json JSON | --arg KEY=VALUE ...] [--config-json JSON] [--config-ref REF] [--start-policy POLICY] [--start-offset N] [--start-time ISO8601]
|
|
1303
|
+
|
|
1304
|
+
Examples:
|
|
1305
|
+
agentinbox follow github repo --agent-id <agentId> --arg owner=holon-run --arg repo=agentinbox
|
|
1306
|
+
agentinbox follow github pr --agent-id <agentId> --arg owner=holon-run --arg repo=agentinbox --arg number=87 --arg withCi=true
|
|
1307
|
+
agentinbox follow github issue --agent-id <agentId> --arg owner=holon-run --arg repo=agentinbox --arg number=180
|
|
1303
1308
|
`,
|
|
1304
1309
|
source: `agentinbox source
|
|
1305
1310
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@holon-run/agentinbox",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "Local event subscription and delivery service for agents.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
"files": [
|
|
21
21
|
"dist/src/",
|
|
22
22
|
"scripts/",
|
|
23
|
+
"skills/",
|
|
23
24
|
"drizzle/",
|
|
24
25
|
"README.md",
|
|
25
26
|
"LICENSE"
|
package/skills/README.md
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Skills
|
|
2
|
+
|
|
3
|
+
The docs site exposes selected repository skills so they can be handed directly
|
|
4
|
+
to another agent.
|
|
5
|
+
|
|
6
|
+
For `AgentInbox`, the preferred first-run path is skill-first onboarding:
|
|
7
|
+
|
|
8
|
+
- hand the bundled `AgentInbox` skill to the agent
|
|
9
|
+
- let the agent verify `agentinbox`, `uxc`, and GitHub auth
|
|
10
|
+
- let the agent register the current session and set up standing subscriptions
|
|
11
|
+
|
|
12
|
+
<!-- INDEX:START -->
|
|
13
|
+
|
|
14
|
+
- [agentinbox](./agentinbox/)
|
|
15
|
+
Use the local AgentInbox service to onboard the current session, connect GitHub through UXC, and operate sources, subscriptions, and the agent inbox.
|
|
16
|
+
<!-- mdorigin:index kind=article -->
|
|
17
|
+
|
|
18
|
+
<!-- INDEX:END -->
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agentinbox
|
|
3
|
+
description: Use the local AgentInbox service to onboard the current session, manage shared sources and subscriptions, connect external providers such as GitHub through UXC, and operate the agent inbox.
|
|
4
|
+
metadata:
|
|
5
|
+
short-description: Operate AgentInbox sources and subscriptions
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# AgentInbox Skill
|
|
9
|
+
|
|
10
|
+
Use this skill when the current agent should set up or use the local
|
|
11
|
+
`agentinbox` daemon.
|
|
12
|
+
|
|
13
|
+
Primary docs:
|
|
14
|
+
|
|
15
|
+
- `https://agentinbox.holon.run/guides/onboarding-with-agent-skill`
|
|
16
|
+
- `https://agentinbox.holon.run/guides/getting-started`
|
|
17
|
+
- `https://agentinbox.holon.run/guides/review-workflows`
|
|
18
|
+
- `https://agentinbox.holon.run/reference/cli`
|
|
19
|
+
|
|
20
|
+
## Install
|
|
21
|
+
|
|
22
|
+
Install `agentinbox` if it is not already available:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
npm install -g @holon-run/agentinbox
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Install `uxc` if GitHub or Feishu adapters are needed:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
brew tap holon-run/homebrew-tap
|
|
32
|
+
brew install uxc
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
UXC repository:
|
|
36
|
+
|
|
37
|
+
- `https://github.com/holon-run/uxc`
|
|
38
|
+
|
|
39
|
+
## First-Run Onboarding
|
|
40
|
+
|
|
41
|
+
Recommended first-run sequence:
|
|
42
|
+
|
|
43
|
+
1. if GitHub access is needed and `gh` is already authenticated, import that auth into `uxc`
|
|
44
|
+
2. register the current terminal session
|
|
45
|
+
3. follow the required sources or resources using the docs examples
|
|
46
|
+
|
|
47
|
+
If GitHub-backed adapters are needed:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
gh auth status
|
|
51
|
+
uxc auth credential import github --from gh
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
This `gh` import path requires `uxc` 0.15.3 or newer.
|
|
55
|
+
|
|
56
|
+
Register the current terminal/runtime session:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
agentinbox agent register
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Treat the returned `agentId` as the stable identity for later commands.
|
|
63
|
+
|
|
64
|
+
## Usage Discipline
|
|
65
|
+
|
|
66
|
+
Defaults:
|
|
67
|
+
|
|
68
|
+
- do not create one GitHub source per PR unless the source itself must be PR-
|
|
69
|
+
scoped
|
|
70
|
+
- prefer shared repo/repo-CI sources plus narrow follows or subscriptions
|
|
71
|
+
- prefer `agentinbox follow` over manual `subscription add` when a follow
|
|
72
|
+
template exists
|
|
73
|
+
- if a source exposes only subscription shortcuts, prefer the shortcut over
|
|
74
|
+
manually reconstructing the same filter and lifecycle fields
|
|
75
|
+
- treat unused task-specific subscriptions as cleanup debt
|
|
76
|
+
- if GitHub polling volume looks high, inspect old subscriptions and duplicate
|
|
77
|
+
temporary sources before adding more
|
|
78
|
+
|
|
79
|
+
This matches the AgentInbox model: sources are shared hosting units, while
|
|
80
|
+
subscriptions carry agent-specific filtering and delivery intent.
|
|
81
|
+
|
|
82
|
+
## Default Async Lifecycle
|
|
83
|
+
|
|
84
|
+
Default to AgentInbox when the work is not purely synchronous in the current
|
|
85
|
+
session.
|
|
86
|
+
|
|
87
|
+
Typical cases:
|
|
88
|
+
|
|
89
|
+
- delayed follow-up that should happen after you stop actively looking at the
|
|
90
|
+
terminal
|
|
91
|
+
- waiting for PR review, CI completion, issue replies, or other external
|
|
92
|
+
events
|
|
93
|
+
- anything that must survive session boundaries instead of living only in chat
|
|
94
|
+
memory
|
|
95
|
+
- reminders that should fire at a specific time or on a recurring schedule
|
|
96
|
+
|
|
97
|
+
Important boundary:
|
|
98
|
+
|
|
99
|
+
- inbox items, subscriptions, and timers can outlive the current terminal
|
|
100
|
+
session
|
|
101
|
+
- terminal delivery does not automatically survive session boundaries just
|
|
102
|
+
because the inbox state does
|
|
103
|
+
- if the original runtime/terminal disappears, items may keep accumulating in
|
|
104
|
+
the inbox while notifications stop reaching you
|
|
105
|
+
- if a later session should resume the same logical agent, re-register or
|
|
106
|
+
explicitly rebind that agent to the current terminal before assuming prompt
|
|
107
|
+
delivery is live again
|
|
108
|
+
|
|
109
|
+
Lifecycle:
|
|
110
|
+
|
|
111
|
+
1. register once per live terminal/runtime session
|
|
112
|
+
2. reuse broad shared sources
|
|
113
|
+
3. add narrow task-scoped follows, subscriptions, or timers
|
|
114
|
+
4. read inbox items in bounded batches and ack only the reviewed batch
|
|
115
|
+
5. clean up task-scoped subscriptions/timers after merge, closure, or abandonment
|
|
116
|
+
|
|
117
|
+
For PR and review workflows, prefer `follow` templates. They reuse shared
|
|
118
|
+
sources, expand the source-specific filters, and attach cleanup behavior:
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
agentinbox agent register
|
|
122
|
+
agentinbox follow github pr --agent-id <agentId> --arg owner=holon-run --arg repo=agentinbox --arg number=87 --arg withCi=true
|
|
123
|
+
agentinbox inbox read --agent-id <agentId>
|
|
124
|
+
agentinbox inbox ack --agent-id <agentId> --through <lastEntryId>
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
Ack discipline:
|
|
128
|
+
|
|
129
|
+
- prefer `agentinbox inbox ack --agent-id <agentId> --through <lastEntryId>`
|
|
130
|
+
after reading a reviewed batch
|
|
131
|
+
- avoid `ack --all` unless you explicitly verified that every current item
|
|
132
|
+
should be cleared
|
|
133
|
+
- do not ack speculative future work just because the current terminal message
|
|
134
|
+
was seen
|
|
135
|
+
|
|
136
|
+
Timer intent:
|
|
137
|
+
|
|
138
|
+
- use `agentinbox timer add` when the trigger is time-based rather than source-based
|
|
139
|
+
- prefer timers over inventing fake local events for reminders like "check CI
|
|
140
|
+
in 30 minutes" or "revisit this PR tomorrow morning"
|
|
141
|
+
|
|
142
|
+
## Core Commands
|
|
143
|
+
|
|
144
|
+
Follow high-level templates:
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
agentinbox follow github repo --agent-id <agentId> --arg owner=holon-run --arg repo=agentinbox
|
|
148
|
+
agentinbox follow github pr --agent-id <agentId> --arg owner=holon-run --arg repo=agentinbox --arg number=87 --arg withCi=true
|
|
149
|
+
agentinbox follow github issue --agent-id <agentId> --arg owner=holon-run --arg repo=agentinbox --arg number=180
|
|
150
|
+
agentinbox follow github pr --agent-id <agentId> --args-json '{"owner":"holon-run","repo":"agentinbox","number":87,"withCi":true}'
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
Use `follow` as the default path for GitHub repo, PR, and issue tracking. Drop
|
|
154
|
+
to `source schema` plus `subscription add` only when you need a custom filter or
|
|
155
|
+
the source has no follow template.
|
|
156
|
+
|
|
157
|
+
Advanced source/subscription commands:
|
|
158
|
+
|
|
159
|
+
```bash
|
|
160
|
+
agentinbox source list
|
|
161
|
+
agentinbox source show <sourceId>
|
|
162
|
+
agentinbox source schema <sourceId>
|
|
163
|
+
agentinbox source add <hostId> repo_events <owner>/<repo> --config-json '{"owner":"holon-run","repo":"agentinbox"}'
|
|
164
|
+
agentinbox source add <hostId> ci_runs <owner>/<repo> --config-json '{"owner":"holon-run","repo":"agentinbox","pollIntervalSecs":30}'
|
|
165
|
+
agentinbox subscription add <sourceId> --shortcut pr --shortcut-args-json '{"number":87}'
|
|
166
|
+
agentinbox subscription add <sourceId> --filter-json '{"metadata":{"headBranch":"main","conclusion":"failure"}}'
|
|
167
|
+
agentinbox subscription list --agent-id <agentId>
|
|
168
|
+
agentinbox subscription remove <subscriptionId>
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
Use manual subscriptions for advanced filters, custom source kinds, or when
|
|
172
|
+
debugging template expansion. If `subscriptionSchema.shortcuts` is non-empty
|
|
173
|
+
but no follow template is available, prefer those shortcut entries first.
|
|
174
|
+
|
|
175
|
+
Read and ack the inbox:
|
|
176
|
+
|
|
177
|
+
```bash
|
|
178
|
+
agentinbox inbox read --agent-id <agentId>
|
|
179
|
+
agentinbox inbox ack --agent-id <agentId> --through <lastEntryId>
|
|
180
|
+
agentinbox inbox send --agent-id <agentId> --message "Please review PR #87"
|
|
181
|
+
agentinbox inbox watch --agent-id <agentId>
|
|
182
|
+
agentinbox inbox ack --agent-id <agentId> --all
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
Default to a batch-bounded ack flow:
|
|
186
|
+
|
|
187
|
+
1. read the inbox items you intend to process
|
|
188
|
+
2. identify the last item you actually reviewed in that batch
|
|
189
|
+
3. ack with `--through <lastEntryId>`
|
|
190
|
+
|
|
191
|
+
Use `ack --all` only after explicitly verifying every current item should be
|
|
192
|
+
cleared. Use `inbox send` for local operator/direct text ingress.
|
|
193
|
+
|
|
194
|
+
Manage timers:
|
|
195
|
+
|
|
196
|
+
```bash
|
|
197
|
+
agentinbox timer add --agent-id <agentId> --at <RFC3339_TIMESTAMP> --message "Check the morning build"
|
|
198
|
+
agentinbox timer add --agent-id <agentId> --every 24h --message "Review today's open PRs"
|
|
199
|
+
agentinbox timer add --agent-id <agentId> --cron "0 8 * * *" --timezone Asia/Shanghai --message "Daily triage"
|
|
200
|
+
agentinbox timer list
|
|
201
|
+
agentinbox timer list --agent-id <agentId>
|
|
202
|
+
agentinbox timer pause <scheduleId>
|
|
203
|
+
agentinbox timer resume <scheduleId>
|
|
204
|
+
agentinbox timer remove <scheduleId>
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
Activation targets:
|
|
208
|
+
|
|
209
|
+
```bash
|
|
210
|
+
agentinbox agent target list <agentId>
|
|
211
|
+
agentinbox agent target add webhook <agentId> --url http://127.0.0.1:8787/webhook
|
|
212
|
+
agentinbox agent target remove <agentId> <targetId>
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
For filtering strategy and review workflow setup, follow the docs links above
|
|
216
|
+
instead of re-explaining the full architecture here.
|
|
217
|
+
|
|
218
|
+
## Troubleshooting
|
|
219
|
+
|
|
220
|
+
Do not start every task by checking daemon status; normal CLI commands should
|
|
221
|
+
auto-connect or surface actionable errors. Use these checks after the first
|
|
222
|
+
AgentInbox command fails, notifications stop arriving, or you suspect a stale
|
|
223
|
+
terminal binding:
|
|
224
|
+
|
|
225
|
+
```bash
|
|
226
|
+
agentinbox --version
|
|
227
|
+
agentinbox daemon status
|
|
228
|
+
agentinbox daemon start
|
|
229
|
+
agentinbox agent register --agent-id <agentId> --force-rebind
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
If GitHub-backed sources fail, verify UXC and imported GitHub auth only after
|
|
233
|
+
the failure points there:
|
|
234
|
+
|
|
235
|
+
```bash
|
|
236
|
+
uxc --version
|
|
237
|
+
gh auth status
|
|
238
|
+
uxc auth credential import github --from gh
|
|
239
|
+
```
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
display_name: AgentInbox
|
|
2
|
+
short_description: Operate the local AgentInbox service for shared sources, subscriptions, inbox workflows, activation targets, and external providers such as GitHub.
|
|
3
|
+
default_prompt: Use AgentInbox to register the current session, inspect sources and subscriptions, prefer broad reusable sources with subscription-side filtering, remove stale subscriptions when they are no longer needed, and read or watch the agent inbox.
|