feat(app): background collection frame for sites, search words and RSS feeds
Targets (none by default), interval and keep days on a new 백그라운드 수집 screen with the results; the worker collects on its own thread through the web search's address check and writes only to the data folder's collect/ (logs carry target names and counts). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -38,9 +38,9 @@ that is not absolute, or is a file, is refused with a message.
|
||||
`config/settings.json` keeps the format of `discord_core.spec.md` and `conversation.spec.md`.
|
||||
|
||||
- `fields()` describes every key the screens edit: its dotted path (`call.mode`), screen
|
||||
(`bot`, `channels`, `chat`, `memory`, `model`, `features`), kind (bool, integer with a range, number with a
|
||||
(`bot`, `channels`, `chat`, `memory`, `model`, `features`, `collect`), kind (bool, integer with a range, number with a
|
||||
range, text, text list, choice with its values, Discord ID, Discord ID list, ID to number map,
|
||||
chat channel list, MCP server list, free object), its default and a Korean label. The screens are built from this
|
||||
chat channel list, MCP server list, collection target list, free object), its default and a Korean label. The screens are built from this
|
||||
list, so a key is added in one place.
|
||||
- `view(dir)` returns every field's current value: the file's value, or the default when the file
|
||||
does not set it. A file that does not parse is reported, not overwritten.
|
||||
@@ -59,10 +59,11 @@ that is not absolute, or is a file, is refused with a message.
|
||||
manages the MCP servers it connects.
|
||||
|
||||
- `features` (new section): `weather` (`getWeather`), `webSearch` (`webSearch`, `fetchWebPage`) and
|
||||
`meals` (`logMeal`, `fetchMeals`, `deleteMeal`), each on by default. The tools of a feature that
|
||||
`meals` (`logMeal`, `fetchMeals`, `deleteMeal`), each on by default; `collect` (background
|
||||
collection, below; no brain tool), also on by default. The tools of a feature that
|
||||
is off go into the brain's `disabled_tools`: they are neither offered nor run
|
||||
(`voice_worker.spec.md`, "Tools"). The other features of the 기능 screen (browser control, PC
|
||||
control, screen viewing, background collection) come with their milestones (M6, M7).
|
||||
control, screen viewing) come with their milestones (M6, M7).
|
||||
- `mcpServers` (new list): each `{name, command, args, env, enabled}`. `name` is 1-32 letters,
|
||||
digits, `-` or `_` without `__` (the brain names a server's tools `<name>__<tool>`), not listed
|
||||
twice; `command` is not empty; `args` a list of strings; `env` the names of the environment
|
||||
@@ -79,6 +80,26 @@ manages the MCP servers it connects.
|
||||
also without debug logging. MCP servers are programs the PC runs; the screen says to add only
|
||||
trusted ones.
|
||||
|
||||
## Background collection (`app/src/collect.rs`)
|
||||
|
||||
`docs/v2/desktop-app.md`, "백그라운드 수집", and `docs/v2/pc-features.md`. The frame for collecting
|
||||
sites, search words and RSS feeds on a schedule; there are **no targets by default**.
|
||||
|
||||
- `collect` (new section): `keepDays` (1-365, default 30) and `targets` (default empty), each
|
||||
`{name, kind, value, everyMinutes, enabled}`. `name` is 1-32 letters, digits, `-` or `_` (any
|
||||
script; it names the target's folder, so not a Windows device name like `con` or `nul`), not
|
||||
listed twice; `kind` is `site`, `search` or `rss`; `value` is an http(s) address for `site` and
|
||||
`rss` (at most 2,000 characters) and the words for `search` (1-200 characters);
|
||||
`everyMinutes` 15-10080 (default 60); `enabled` on by default.
|
||||
- On start, with `features.collect` on and at least one enabled target, the app writes
|
||||
`config/collect.json` (the folder `collect/`, `keepDays` and the enabled targets) and passes it to
|
||||
the worker as `JARVIS_COLLECT_PATH`; otherwise it removes that file and passes nothing. The worker
|
||||
collects while the services run (`voice_worker.spec.md`, "Background collection"); results stay
|
||||
in `collect/<name>/<YYYY-MM-DD>.jsonl` in the data folder only.
|
||||
- `results(data, target, limit)` reads them newest first (the newest day file first, its last line
|
||||
first), each item with its `target`; a name that is not a valid target name is refused, so no
|
||||
other folder is read. Lines that do not parse are skipped.
|
||||
|
||||
## Secrets (`app/src/secrets.rs`)
|
||||
|
||||
`config/secrets.dat` holds a JSON object of named secrets (`discordToken`, the MCP servers'
|
||||
@@ -284,6 +305,7 @@ back as Korean messages for the screen. The Tauri shell passes the screens' `inv
|
||||
| `settings_fields` / `settings_view` / `settings_apply` `{changes}` | the settings editor above; `restartNeeded` when the services run; `sync` with the chat channels sent to Discord (below) |
|
||||
| `service_start` / `service_stop` / `service_restart` / `dashboard` | the controller and its snapshot; start and restart run in the background, stop also cancels a start |
|
||||
| `discord_channel_info` `{id}` / `channel_sync_status` | a channel's Discord name and topic / each synced chat channel's last result (above) |
|
||||
| `collect_results` `{target, limit}` | collected items newest first (`target` null: every target; `limit` 1-500, default 100) |
|
||||
| `mcp_env_status` / `mcp_env_set` `{server, name, value}` | which MCP environment values are stored (`{server: {NAME: bool}}`, never the values) / store one (an empty value removes it); only for a saved server and name |
|
||||
| `install_status` / `install_start` / `install_cancel` | the install steps and their state, bytes and last line / run what is not done in the background / stop it |
|
||||
| `logs_query` `{tab, level, find, after, limit}` / `logs_error_report` / `logs_export` `{from, to}` | the log hub; the zip goes to `logs/` and its path comes back |
|
||||
@@ -309,13 +331,16 @@ Plain HTML, CSS and an ES module, no build step, dark theme after `DESIGN.md`. A
|
||||
Strata's last line, and stop in the header; the header with start, restart and stop is rebuilt
|
||||
only when the state changes, so a click is never lost to the refresh. Every screen change starts
|
||||
a new generation: an answer that arrives after the user moved to another screen is dropped.
|
||||
- **Settings screens** (봇, 채널·호출, 채팅 채널, 대화 기억, 모델, 기능): built from `settings_fields`; only
|
||||
- **Settings screens** (봇, 채널·호출, 채팅 채널, 대화 기억, 모델, 기능, 백그라운드 수집): built from `settings_fields`; only
|
||||
changed fields are sent; the server and voice channel are pickers (choosing another server clears
|
||||
the voice channel and lists only that server's channels); the chat channels are a table
|
||||
with their switches; the bot screen also changes the token; the 기능 screen has the feature
|
||||
switches and one card per MCP server (name, command, arguments and environment variable names
|
||||
one per line, on/off, delete), and for a saved server a password box per environment variable
|
||||
that stores its value on its own.
|
||||
that stores its value on its own. The 백그라운드 수집 screen has the targets (a table: name, kind,
|
||||
address or words, interval in minutes, on/off, delete), the keep days, and the results (the
|
||||
newest 100, filtered by target, each with its time, title, link and the start of its text shown
|
||||
as plain text).
|
||||
- **Logs**: tab, level and text filters, pause, live follow (lines after the last seen), "최근 오류
|
||||
복사" (to the clipboard; over 2,000 characters it suggests the zip), and the zip export by days.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user