mirror of
https://github.com/agentscope-ai/ReMe.git
synced 2026-11-27 23:58:47 +00:00
Some checks are pending
CI / Python packages / Build and verify distributions (push) Waiting to run
CI / Python quality / GitHub Actions (push) Waiting to run
CI / Python quality / Pre-commit (push) Waiting to run
CI / Python tests / Hermes embedded - ubuntu-latest (push) Waiting to run
CI / Python tests / Hermes embedded - windows-latest (push) Waiting to run
CI / Python tests / Unit Tests - py3.11 (push) Waiting to run
CI / Python tests / Unit Tests - py3.12 (push) Waiting to run
CI / Python tests / Unit Tests - py3.13 (push) Waiting to run
CI / Python tests / Unit Tests - py3.14 (push) Waiting to run
CI / ReMe Studio / Studio checks (push) Waiting to run
CI / Windows / CLI smoke - py3.11 (push) Waiting to run
Deploy / Documentation / Build documentation (push) Waiting to run
Deploy / Documentation / deploy (push) Blocked by required conditions
Security / CodeQL / Analyze javascript-typescript (push) Waiting to run
Security / CodeQL / Analyze python (push) Waiting to run
* refactor(proactive)!: separate runtime ownership and unify delivery * refactor(proactive): finish runtime and Studio migration * test(proactive): make scheduled skip coverage deterministic * refactor(studio): unify navigation and notebook resource loading * feat(studio): edit workspace documents and update proactive task names * refactor(studio): simplify task settings and navigation * feat(studio): secure and supervise backend settings * feat(studio): unify workbench timelines and refine desktop updates Use shared timeline panes for notebook, memory, and resources. Add Todo creation ordering, persist companion visibility, and align desktop update handling and release artifacts. Recheck editor file versions at read and publication boundaries. Retry reminder detail requests from the resource view. * fix(studio): support unsigned GitHub preview releases * fix: verify container state and isolate proactive view errors Mount private supervisor state in Docker smoke tests and verify token and settings persistence. Exercise Studio startup with a loopback-only model fixture, and exclude packaged desktop output from Docker contexts. Keep Remy subscriptions and healthy tasks available when an individual task has an invalid workspace path or session history. * fix(home): align candidate Docker context exclusions * chore(deps): update openai-codex dependency to v0.172.0 - Bump openai-codex from version 0.169.0 to 0.172.0 in pyproject.toml - Keep other dependencies unchanged - Ensure compatibility with latest openai-codex features and fixes * fix(daemon): discover parent dotenv and isolate listeners Restore parent-directory environment discovery in workers while retaining system precedence. Partition the default supervisor profile and lock by the configured bind address and port.
177 lines
9.2 KiB
YAML
177 lines
9.2 KiB
YAML
task_query: |
|
||
# Background
|
||
Workspace directory: {workspace_dir}
|
||
Time zone: {app_timezone}
|
||
Current time: {now}
|
||
- `Records directory`: {daily_dir}
|
||
- `Record path for this run`: {record_path}
|
||
|
||
## Events for this run
|
||
{event_batch}
|
||
|
||
## Task requirements
|
||
{task_description}
|
||
|
||
# Steps
|
||
|
||
## 1. Gather information for this run
|
||
[is_event] Read this run's events and the files they mention, including images. If you haven't read a file in full, try using `offset` to continue reading. Use the task requirements to identify the `key information`.
|
||
[is_event] If a reminder is due or its condition is met, that also counts as `key information`. If there is no `key information`, reply only with "{no_key_information}" and finish the run.
|
||
[is_cron] Complete this run's work as required by the task and identify the `key information` in the results. Leave any requirements to remind the user or send results for step 3.
|
||
|
||
## 2. Search past records
|
||
Search for past records only in the `Records directory` shared by all tasks. Choose keywords or a regular expression based on the `key information`.
|
||
|
||
- See what has already been recorded and which reminders have already been written. Check records from the last {recent_history_hours} hours first. Apply the respective rules for avoiding duplicate records and reminders in step 3.
|
||
- When checking reminders that have already been written, read `reminder_priority` and `reminder_message` from the original record's YAML.
|
||
- Put related records in time order to see how things have developed and how this run's information relates to earlier progress. You can draw inferences from the records. Label any inference you write down.
|
||
|
||
Go to step 3 when you have found enough information, cannot find any relevant records, or have used the local search tool {max_local_search_calls} times.
|
||
|
||
## 3. Record and remind
|
||
Write the body, the decision about whether to remind the user, and what to say in the file specified by `Record path for this run`.
|
||
|
||
### Body
|
||
Record only new information that is relevant to the task and worth keeping, such as progress or a change in timing. Skip repeats and anything the user does not want to keep.
|
||
Write the body in Markdown. Keep it brief and clear, include the necessary sources and links, and leave out sensitive information. If there is no new information worth keeping, leave the body empty.
|
||
For local file links in the body and reminder, use paths relative to the directory containing this run's record, for example `[xxx](xxx.md)`.
|
||
|
||
### Reminder
|
||
Use the `Task requirements` to decide which items warrant a reminder, then choose the priority. Do this even if the body is empty.
|
||
- Skip the reminder if its condition has not been met or the user does not want it.
|
||
- If a reminder about the same development has already been written, skip it even if the user has yet to read it.
|
||
- For scheduled reminders and reports, check for duplicates by scheduled time and write each occurrence only once. If the task requires sending every occurrence, send it as usual even if the result is unchanged.
|
||
|
||
At the top of the file, fill in the two YAML fields below between two lines containing `---`.
|
||
- `reminder_priority`
|
||
- If there is nothing to remind the user about, write `skip`.
|
||
- For items that warrant a reminder, use the priority specified by the task. If the task gives no priority, choose the first one that applies in the order below.
|
||
- `P0`: The agreed reminder time has arrived, an explicit reminder condition is met, or the user clearly needs to decide or act now.
|
||
- `P1`: There is important progress on something the task tracks, and you can tell the user later.
|
||
- `P2`: This run found useful new information related to the task.
|
||
- If several items warrant a reminder, use the highest priority.
|
||
- `reminder_message`
|
||
- For `P0`, `P1`, or `P2`, write one short sentence in plain language as if speaking directly to the user, covering only what warrants a reminder this run.
|
||
- For `skip`, leave this empty or briefly say why.
|
||
- Leave out `delivered_at`, `read_at`, and `chat_message_ids`. The system maintains these fields.
|
||
|
||
After the round commits, the system puts a `P0`, `P1`, or `P2` reminder in the user's inbox. The user may not have seen it yet.
|
||
|
||
task_query_zh: |
|
||
# 背景
|
||
工作区目录:{workspace_dir}
|
||
时区:{app_timezone}
|
||
当前时间:{now}
|
||
- `记录目录`:{daily_dir}
|
||
- `本轮记录路径`:{record_path}
|
||
|
||
## 本轮事件
|
||
{event_batch}
|
||
|
||
## 任务要求
|
||
{task_description}
|
||
|
||
# 执行步骤
|
||
|
||
## 1. 获取本轮信息
|
||
[is_event] 阅读本轮事件和事件提到的文件,包括图片。如果文件没读全,可以试着用 `offset` 继续读。按任务要求找出 `关键信息`。
|
||
[is_event] 到了提醒时间或满足了提醒条件,也算 `关键信息`。如果没有 `关键信息`,只回复「{no_key_information}」,结束本轮。
|
||
[is_cron] 按任务要求完成本轮工作,从结果中找出 `关键信息`。提醒用户或发送结果的要求留到第 3 步处理。
|
||
|
||
## 2. 查询历史记录
|
||
只在所有任务共用的 `记录目录` 里查历史。根据 `关键信息` 选择关键词或正则。
|
||
|
||
- 看看哪些内容已经记过,哪些提醒已经写过。优先核对最近 {recent_history_hours} 小时内的记录。第 3 步按各自的规则去重。
|
||
- 核对已写提醒时,从原记录的 YAML 读取 `reminder_priority` 和 `reminder_message`。
|
||
- 把相关记录按时间串起来,看看事情是怎么发展的,以及本轮信息和之前的进展有什么关系。可以根据记录作推断,写下来时注明是推断。
|
||
|
||
找到足够的信息、找不到相关记录,或已经用了 {max_local_search_calls} 次本地搜索工具,就进入第 3 步。
|
||
|
||
## 3. 记录与提醒
|
||
把正文、是否提醒和要提醒的话,都写到 `本轮记录路径` 指定的文件里。
|
||
|
||
### 正文
|
||
只记录和任务有关、值得保留的新信息,比如事情有了新进展,或者时间有变。跳过重复或用户不想保留的内容。
|
||
用 Markdown 简洁写清正文,保留必要的来源和链接,省略敏感信息。没有值得记录的新信息时,正文留空。
|
||
正文和提醒中的本地文件链接都使用相对路径,以本轮记录文件所在目录为基准,例如 `[xxx](xxx.md)`。
|
||
|
||
### 提醒
|
||
根据 `任务要求` 判断哪些事项需要提醒,再决定等级。正文留空时也一样。
|
||
- 条件还没满足,或者用户不想收到,就跳过。
|
||
- 同一进展的提醒写过就跳过,即使用户还没读。
|
||
- 定时提醒和汇报按计划时间去重,同一次只写一次。任务要求每次都发送时,即使结果没变,也照常发送。
|
||
|
||
在文件开头填写下面两个 YAML 字段,用两行 `---` 包起来。
|
||
- `reminder_priority`
|
||
- 没有需要提醒的事项时,填 `skip`。
|
||
- 对需要提醒的事项,使用任务指定的等级。没指定时,按下面的顺序选第一个符合的等级。
|
||
- `P0`:到了约定的提醒时间、满足了明确的提醒条件,或用户明显需要马上决定或处理。
|
||
- `P1`:任务跟进的事情有重要进展,可以稍后告诉用户。
|
||
- `P2`:本轮发现了和任务相关的有用新信息。
|
||
- 有多项需要提醒时,用最高的等级。
|
||
- `reminder_message`
|
||
- 等级是 `P0`、`P1` 或 `P2` 时,像直接跟用户说话一样,用一句简短的大白话,只说本轮需要提醒的事。
|
||
- 等级是 `skip` 时,可以留空,也可以简短说明原因。
|
||
- 不要写 `delivered_at`、`read_at` 或 `chat_message_ids`,系统会维护这些字段。
|
||
|
||
本轮提交后,系统会把 `P0`、`P1` 或 `P2` 提醒放进用户的收件箱。用户可能还没看到。
|
||
|
||
repair_record_query: |
|
||
Use the error below to fix the YAML frontmatter directly in `{record_path}`. Keep the original meaning and the Markdown body intact.
|
||
|
||
{error}
|
||
|
||
After saving, if your Python environment has PyYAML, run the command below to check the file. Fix any errors it reports.
|
||
{yaml_check}
|
||
|
||
repair_record_query_zh: |
|
||
按下面的报错,直接修好 `{record_path}` 的 YAML 文件头,保留原意和 Markdown 正文。
|
||
|
||
{error}
|
||
|
||
保存后,如果当前 Python 环境装了 PyYAML,就运行下面的命令自检。有报错就继续修。
|
||
{yaml_check}
|
||
|
||
record_yaml_check: |
|
||
```bash
|
||
python - {record_path} <<'PY'
|
||
import re
|
||
import sys
|
||
from pathlib import Path
|
||
|
||
import yaml
|
||
|
||
text = Path(sys.argv[1]).read_text(encoding="utf-8-sig")
|
||
header = re.match(r"\A(?:[ \t]*\n)*---[ \t]*\n(.*?)^---[ \t]*$", text, re.MULTILINE | re.DOTALL)
|
||
if header is None:
|
||
raise SystemExit("Missing YAML frontmatter")
|
||
yaml.safe_load(header[1])
|
||
print("YAML OK")
|
||
PY
|
||
```
|
||
|
||
event_input: |
|
||
### Event {number}
|
||
- ID: `{event_id}`
|
||
- Time: {event_ts}
|
||
- Source: {source}
|
||
- Description: {description}
|
||
[has_files] Files:
|
||
[has_files] {paths}
|
||
[no_files] Files: None
|
||
|
||
event_input_zh: |
|
||
### 事件 {number}
|
||
- ID:`{event_id}`
|
||
- 时间:{event_ts}
|
||
- 来源:{source}
|
||
- 描述:{description}
|
||
[has_files] 文件:
|
||
[has_files] {paths}
|
||
[no_files] 文件:无
|
||
|
||
scheduled_event_input: |
|
||
- Time trigger, scheduled time {event_ts}
|
||
|
||
scheduled_event_input_zh: |
|
||
- 时间触发,计划时间 {event_ts}
|