@holon-run/agentinbox 1.0.3 → 1.0.5
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 +13 -6
- package/dist/src/adapters.js +12 -0
- package/dist/src/cli.js +242 -62
- package/dist/src/current_agent.js +31 -0
- package/dist/src/http.js +127 -16
- package/dist/src/service.js +39 -30
- package/dist/src/source_hosts.js +2 -4
- package/dist/src/source_schema.js +1 -3
- package/dist/src/sources/feishu.js +1030 -31
- package/dist/src/sources/github.js +15 -6
- package/dist/src/sources/remote.js +25 -0
- package/dist/src/sources/remote_modules.js +30 -6
- package/dist/src/store.js +92 -30
- package/drizzle/migrations/0004_provider_raw_payload.sql +3 -0
- package/drizzle/schema.ts +2 -0
- package/package.json +3 -2
- package/skills/README.md +2 -2
- package/skills/agentinbox/SKILL.md +59 -14
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
---
|
|
2
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.
|
|
3
|
+
description: Use the local AgentInbox service to onboard the current runtime/session, manage shared sources and subscriptions, connect external providers such as GitHub through UXC, and operate the agent inbox.
|
|
4
4
|
metadata:
|
|
5
5
|
short-description: Operate AgentInbox sources and subscriptions
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# AgentInbox Skill
|
|
9
9
|
|
|
10
|
-
Use this skill when
|
|
11
|
-
`agentinbox` daemon.
|
|
10
|
+
Use this skill when a Codex, Claude Code, Holon, or other supported agent
|
|
11
|
+
runtime should set up or use the local `agentinbox` daemon.
|
|
12
12
|
|
|
13
13
|
Primary docs:
|
|
14
14
|
|
|
@@ -41,7 +41,7 @@ UXC repository:
|
|
|
41
41
|
Recommended first-run sequence:
|
|
42
42
|
|
|
43
43
|
1. if GitHub access is needed and `gh` is already authenticated, import that auth into `uxc`
|
|
44
|
-
2. register the current
|
|
44
|
+
2. register the current runtime/session
|
|
45
45
|
3. follow the required sources or resources using the docs examples
|
|
46
46
|
|
|
47
47
|
If GitHub-backed adapters are needed:
|
|
@@ -53,12 +53,21 @@ uxc auth credential import github --from gh
|
|
|
53
53
|
|
|
54
54
|
This `gh` import path requires `uxc` 0.15.3 or newer.
|
|
55
55
|
|
|
56
|
-
Register the current
|
|
56
|
+
Register the current runtime/session:
|
|
57
57
|
|
|
58
58
|
```bash
|
|
59
59
|
agentinbox agent register
|
|
60
60
|
```
|
|
61
61
|
|
|
62
|
+
In Holon, the no-arg form uses `HOLON_AGENT_ID` and
|
|
63
|
+
`HOLON_EXTERNAL_TRIGGER_URL` when they are available and registers a webhook
|
|
64
|
+
activation target. If the trigger URL is not in the environment, pass it
|
|
65
|
+
explicitly:
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
agentinbox agent register --agent-id <holonAgentId> --webhook-url <externalTriggerUrl>
|
|
69
|
+
```
|
|
70
|
+
|
|
62
71
|
Treat the returned `agentId` as the stable identity for later commands.
|
|
63
72
|
|
|
64
73
|
## Usage Discipline
|
|
@@ -96,19 +105,19 @@ Typical cases:
|
|
|
96
105
|
|
|
97
106
|
Important boundary:
|
|
98
107
|
|
|
99
|
-
- inbox items, subscriptions, and timers can outlive the current
|
|
108
|
+
- inbox items, subscriptions, and timers can outlive the current runtime
|
|
100
109
|
session
|
|
101
|
-
-
|
|
102
|
-
because the inbox state does
|
|
103
|
-
- if the original runtime/terminal disappears, items may
|
|
104
|
-
the inbox while notifications stop reaching you
|
|
110
|
+
- activation delivery does not automatically survive every session boundary
|
|
111
|
+
just because the inbox state does
|
|
112
|
+
- if the original runtime/terminal or webhook trigger disappears, items may
|
|
113
|
+
keep accumulating in the inbox while notifications stop reaching you
|
|
105
114
|
- if a later session should resume the same logical agent, re-register or
|
|
106
|
-
explicitly rebind that agent to the current terminal
|
|
107
|
-
delivery is live again
|
|
115
|
+
explicitly rebind that agent to the current terminal or webhook target
|
|
116
|
+
before assuming prompt delivery is live again
|
|
108
117
|
|
|
109
118
|
Lifecycle:
|
|
110
119
|
|
|
111
|
-
1. register once per live
|
|
120
|
+
1. register once per live runtime/session
|
|
112
121
|
2. reuse broad shared sources
|
|
113
122
|
3. add narrow task-scoped follows, subscriptions, or timers
|
|
114
123
|
4. read inbox items in bounded batches and ack only the reviewed batch
|
|
@@ -117,6 +126,9 @@ Lifecycle:
|
|
|
117
126
|
For PR and review workflows, prefer `follow` templates. They reuse shared
|
|
118
127
|
sources, expand the source-specific filters, and attach cleanup behavior:
|
|
119
128
|
|
|
129
|
+
For Holon, ensure `HOLON_EXTERNAL_TRIGGER_URL` is set or use `--webhook-url`
|
|
130
|
+
when registering.
|
|
131
|
+
|
|
120
132
|
```bash
|
|
121
133
|
agentinbox agent register
|
|
122
134
|
agentinbox follow github pr --agent-id <agentId> --arg owner=holon-run --arg repo=agentinbox --arg number=87 --arg withCi=true
|
|
@@ -154,6 +166,33 @@ Use `follow` as the default path for GitHub repo, PR, and issue tracking. Drop
|
|
|
154
166
|
to `source schema` plus `subscription add` only when you need a custom filter or
|
|
155
167
|
the source has no follow template.
|
|
156
168
|
|
|
169
|
+
Feishu/Lark follows require a UXC credential that can host the Feishu app
|
|
170
|
+
connection. For bot mention workflows, prefer the global mention template so
|
|
171
|
+
the user does not need to discover a group `chat_id` or bot `open_id` first:
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
agentinbox follow feishu mentions --agent-id <agentId> --config-json '{"uxcAuth":"feishu-default"}'
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
When `openId` is omitted, `AgentInbox` resolves the configured app bot's
|
|
178
|
+
`open_id` through UXC before creating the subscription. Pass `--arg
|
|
179
|
+
openId=<openId>` only when following mentions for a different user or bot.
|
|
180
|
+
|
|
181
|
+
Use the chat-scoped templates when the task is explicitly limited to one group:
|
|
182
|
+
|
|
183
|
+
```bash
|
|
184
|
+
agentinbox follow feishu chat --agent-id <agentId> --arg chatId=<chatId> --config-json '{"uxcAuth":"feishu-default"}'
|
|
185
|
+
agentinbox follow feishu mention --agent-id <agentId> --arg chatId=<chatId> --arg openId=<botOpenId> --config-json '{"uxcAuth":"feishu-default"}'
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
Feishu inbox items include `metadata.chatId`, `metadata.messageId`, and a
|
|
189
|
+
`deliveryHandle`. Use `source invoke` for local context before replying:
|
|
190
|
+
|
|
191
|
+
```bash
|
|
192
|
+
agentinbox source invoke <sourceId> --operation get_message_context --input-json '{"messageId":"<messageId>","chatId":"<chatId>","windowBefore":5,"windowAfter":5}'
|
|
193
|
+
agentinbox deliver invoke --handle-json '<deliveryHandle-json>' --operation send_text --input-json '{"text":"Acknowledged","uxcAuth":"feishu-default"}'
|
|
194
|
+
```
|
|
195
|
+
|
|
157
196
|
Advanced source/subscription commands:
|
|
158
197
|
|
|
159
198
|
```bash
|
|
@@ -206,6 +245,11 @@ agentinbox timer remove <scheduleId>
|
|
|
206
245
|
|
|
207
246
|
Activation targets:
|
|
208
247
|
|
|
248
|
+
`agent register` normally creates or refreshes the current runtime activation
|
|
249
|
+
target automatically: a terminal target for terminal-backed runtimes, or a
|
|
250
|
+
webhook target for Holon when a trigger URL is available. Add manual activation
|
|
251
|
+
targets only when needed:
|
|
252
|
+
|
|
209
253
|
```bash
|
|
210
254
|
agentinbox agent target list <agentId>
|
|
211
255
|
agentinbox agent target add webhook <agentId> --url http://127.0.0.1:8787/webhook
|
|
@@ -220,13 +264,14 @@ instead of re-explaining the full architecture here.
|
|
|
220
264
|
Do not start every task by checking daemon status; normal CLI commands should
|
|
221
265
|
auto-connect or surface actionable errors. Use these checks after the first
|
|
222
266
|
AgentInbox command fails, notifications stop arriving, or you suspect a stale
|
|
223
|
-
terminal binding:
|
|
267
|
+
terminal or webhook binding:
|
|
224
268
|
|
|
225
269
|
```bash
|
|
226
270
|
agentinbox --version
|
|
227
271
|
agentinbox daemon status
|
|
228
272
|
agentinbox daemon start
|
|
229
273
|
agentinbox agent register --agent-id <agentId> --force-rebind
|
|
274
|
+
agentinbox agent register --agent-id <holonAgentId> --webhook-url <externalTriggerUrl> --force-rebind
|
|
230
275
|
```
|
|
231
276
|
|
|
232
277
|
If GitHub-backed sources fail, verify UXC and imported GitHub auth only after
|