feat: news notifications for the background collection and a collectedNews tool
Each collection target can announce new items at once or in a daily digest (off by default) in collect.notifyChannel, as titles and links only, with no LLM; each post is recorded in the activity log. The brain gets a read-only collectedNews tool (every target's newest items by default, fenced as untrusted web content), offered with the app's collection file and the collection feature, and available to scheduled tasks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -60,7 +60,7 @@ manages the MCP servers it connects.
|
||||
|
||||
- `features` (new section): `weather` (`getWeather`), `webSearch` (`webSearch`, `fetchWebPage`) and
|
||||
`meals` (`logMeal`, `fetchMeals`, `deleteMeal`), each on by default; `collect` (background
|
||||
collection, below; no brain tool) and `browser` (the bot browser, below "Bot browser", and its
|
||||
collection, below, and the brain tool `collectedNews`) and `browser` (the bot browser, below "Bot browser", and its
|
||||
brain tool `botBrowser`, `src/jarvis/tools/builtin/bot_browser.spec.md`), also on by default;
|
||||
`browserShare` (봇용 크롬창 화면공유 선택 표시, the bot browser on the virtual monitor, below
|
||||
"Virtual monitor"), off by default; `schedule` (reminders and scheduled tasks, below
|
||||
@@ -183,8 +183,8 @@ editable on the 사람별 지침 screen.
|
||||
|
||||
`docs/v2/proactive.md` (제안 5). What Jarvis did outside its answers, for the 한 일 screen: each chat
|
||||
channel action the brain's tool asked for (`chat.send`, `chat.edit`, `chat.react`, `chat.delete`,
|
||||
`chat.pin`, `chat.unpin`) and each schedule delivery (`schedule.remind`, `schedule.task`), done or
|
||||
failed. PC control actions join it with M7. Ordinary answers are not recorded.
|
||||
`chat.pin`, `chat.unpin`), each schedule delivery (`schedule.remind`, `schedule.task`) and each
|
||||
news notification (`collect.notify`), done or failed. PC control actions join it with M7. Ordinary answers are not recorded.
|
||||
|
||||
- One JSON line per action in `activity/<YYYY-MM-DD>.jsonl` (the folder is made at the first one):
|
||||
`{at, kind, target, by, ok, note}`. `target` is the channel (and message) id or `예약 <id>`; `by`
|
||||
@@ -197,6 +197,28 @@ failed. PC control actions join it with M7. Ordinary answers are not recorded.
|
||||
stops the action.
|
||||
- `activity_list` `{limit}` (1-1000, default 200) reads the newest first.
|
||||
|
||||
## News notifications (`app/src/collect_notify.rs`)
|
||||
|
||||
`docs/v2/proactive.md` (제안 2). New items of the background collection announced in a chat
|
||||
channel, titles and links only (no LLM, nothing Jarvis writes about them).
|
||||
|
||||
- Each collection target has `notify` (`off` by default, `now`, `daily`); `collect.notifyChannel`
|
||||
(a registered chat channel with sending on, anything else refused; null by default: nothing is
|
||||
announced) and `collect.digestHour` (0-23, default 9, local time). Nothing is announced with
|
||||
`features.collect` off.
|
||||
- While the services run, every minute: a target whose notifications just began only marks what it
|
||||
has as seen (nothing old is announced); a `now` target posts what is new since its last post; a
|
||||
`daily` target posts once a day in the digest hour what came since its last digest (nothing when
|
||||
nothing came). The state is `config/collect-notify.json` (per target the newest item announced and
|
||||
the day of its last digest).
|
||||
- A post is `수집 소식: <target> 새 글 N건` (`수집 소식 하루 요약: ...` for the digest), then at most 10
|
||||
items as `- <title> <link>` (titles at most 200 characters; the link in `<>` so Discord shows no
|
||||
preview), then `외 N건`. Posts ping nobody. Each is recorded in the activity (`collect.notify`,
|
||||
target `수집 <name> → 채널 <id>`, outcome); a failed post is not tried again.
|
||||
- The 백그라운드 수집 screen has the channel, the hour and a "새 글 알림" column in the targets table.
|
||||
- The brain's `collectedNews` tool reads the same results
|
||||
(`src/jarvis/tools/builtin/collected_news.spec.md`); it is behind `features.collect` too.
|
||||
|
||||
## Secrets (`app/src/secrets.rs`)
|
||||
|
||||
`config/secrets.dat` holds a JSON object of named secrets (`discordToken`, the MCP servers'
|
||||
|
||||
Reference in New Issue
Block a user