mirror of
https://github.com/agentscope-ai/ReMe.git
synced 2026-09-30 01:52:29 +00:00
570 lines
15 KiB
YAML
570 lines
15 KiB
YAML
service:
|
|
backend: http
|
|
# backend: mcp
|
|
|
|
# Default dev config points vault_dir at ./.reme so `python -m reme4 start`
|
|
# can be run from the repo root and exercise the full atomic-tool surface
|
|
# against the seeded test data. Override the `vault_dir=` CLI arg.
|
|
vault_dir: .reme
|
|
daily_dir: daily
|
|
digest_dir: digest
|
|
resource_dir: resource
|
|
|
|
jobs:
|
|
# ════════════════════════════════════════════════════════════════════
|
|
# UTILITY — service introspection
|
|
# ════════════════════════════════════════════════════════════════════
|
|
version:
|
|
backend: base
|
|
description: "return reme4 package version"
|
|
parameters:
|
|
type: object
|
|
properties: {}
|
|
steps:
|
|
- backend: version_step
|
|
|
|
health_check:
|
|
backend: base
|
|
description: "return a concise health-check snapshot of reme4 components"
|
|
parameters:
|
|
type: object
|
|
properties: {}
|
|
steps:
|
|
- backend: health_check_step
|
|
|
|
help:
|
|
backend: base
|
|
description: "list all registered jobs with their metadata"
|
|
parameters:
|
|
type: object
|
|
properties: {}
|
|
steps:
|
|
- backend: help_step
|
|
|
|
reindex:
|
|
backend: base
|
|
description: "wipe the file store and rebuild it from the watcher's tracked files"
|
|
parameters:
|
|
type: object
|
|
properties: {}
|
|
steps:
|
|
- backend: reindex_step
|
|
|
|
index_changes:
|
|
backend: base
|
|
description: "apply a batch of file changes (added/modified/deleted) into file_store"
|
|
parameters:
|
|
type: object
|
|
properties:
|
|
changes:
|
|
type: array
|
|
description: "list of change items"
|
|
items:
|
|
type: object
|
|
properties:
|
|
change:
|
|
type: string
|
|
enum: [added, modified, deleted]
|
|
description: "type of file change"
|
|
path:
|
|
type: string
|
|
description: "absolute file path"
|
|
required:
|
|
- change
|
|
- path
|
|
required:
|
|
- changes
|
|
steps:
|
|
- backend: index_changes_step
|
|
|
|
# ════════════════════════════════════════════════════════════════════
|
|
# ATOMIC TOOLS — same surface plugins/reme-{service,expert} expose
|
|
# ════════════════════════════════════════════════════════════════════
|
|
|
|
# ── Retrieve ───────────────────────────────────────────────────────
|
|
search:
|
|
backend: base
|
|
description: "Hybrid vault search (vector + BM25, RRF-fused)."
|
|
parameters:
|
|
type: object
|
|
properties:
|
|
query:
|
|
type: string
|
|
description: "search query"
|
|
limit:
|
|
type: integer
|
|
description: "max results"
|
|
default: 5
|
|
min_score:
|
|
type: number
|
|
description: "min fused score"
|
|
default: 0.0
|
|
required:
|
|
- query
|
|
steps:
|
|
- backend: search_step
|
|
vector_weight: 0.7
|
|
candidate_multiplier: 3.0
|
|
expand_links: true
|
|
max_links_per_direction: 10
|
|
|
|
traverse:
|
|
backend: base
|
|
description: "Walk the wikilink graph from a seed path."
|
|
parameters:
|
|
type: object
|
|
properties:
|
|
path:
|
|
type: string
|
|
description: "seed path (vault-relative)"
|
|
depth:
|
|
type: integer
|
|
description: "hop limit"
|
|
default: 1
|
|
direction:
|
|
type: string
|
|
description: "forward / backward / both"
|
|
default: both
|
|
required:
|
|
- path
|
|
steps:
|
|
- backend: traverse_step
|
|
|
|
# ── Read Operations ───────────────────────────────────────────────────────────
|
|
list:
|
|
backend: base
|
|
description: "List files under a vault path."
|
|
parameters:
|
|
type: object
|
|
properties:
|
|
path:
|
|
type: string
|
|
description: "vault-relative dir; empty = root"
|
|
default: ""
|
|
recursive:
|
|
type: boolean
|
|
description: "recurse"
|
|
default: false
|
|
limit:
|
|
type: integer
|
|
description: "max results"
|
|
default: 100
|
|
steps:
|
|
- backend: list_step
|
|
|
|
read:
|
|
backend: base
|
|
description: "Read a markdown file under the vault."
|
|
parameters:
|
|
type: object
|
|
properties:
|
|
path:
|
|
type: string
|
|
description: "vault-relative path; markdown only"
|
|
start_line:
|
|
type: integer
|
|
description: "first line (1-based, inclusive)"
|
|
end_line:
|
|
type: integer
|
|
description: "last line (1-based, inclusive)"
|
|
required:
|
|
- path
|
|
steps:
|
|
- backend: read_step
|
|
|
|
stat:
|
|
backend: base
|
|
description: "Stat a vault file (size, mtime, exists, is_dir, is_file)."
|
|
parameters:
|
|
type: object
|
|
properties:
|
|
path:
|
|
type: string
|
|
description: "vault-relative path"
|
|
required:
|
|
- path
|
|
steps:
|
|
- backend: stat_step
|
|
|
|
frontmatter:read:
|
|
backend: base
|
|
description: "Read a file's YAML frontmatter as a dict."
|
|
parameters:
|
|
type: object
|
|
properties:
|
|
path:
|
|
type: string
|
|
description: "vault-relative path"
|
|
required:
|
|
- path
|
|
steps:
|
|
- backend: frontmatter:read_step
|
|
|
|
# ── Write Operations──────────────────────────────────────────────────────────
|
|
write:
|
|
backend: base
|
|
description: "Write a markdown file (create or overwrite) with name/description frontmatter."
|
|
parameters:
|
|
type: object
|
|
properties:
|
|
path:
|
|
type: string
|
|
description: "vault-relative path; markdown only"
|
|
name:
|
|
type: string
|
|
description: "frontmatter name"
|
|
description:
|
|
type: string
|
|
description: "frontmatter description"
|
|
content:
|
|
type: string
|
|
description: "body"
|
|
required:
|
|
- path
|
|
- name
|
|
- description
|
|
- content
|
|
steps:
|
|
- backend: write_step
|
|
|
|
edit:
|
|
backend: base
|
|
description: "Find-and-replace in a markdown file (all occurrences)."
|
|
parameters:
|
|
type: object
|
|
properties:
|
|
path:
|
|
type: string
|
|
description: "vault-relative path"
|
|
old:
|
|
type: string
|
|
description: "text to find"
|
|
new:
|
|
type: string
|
|
description: "replacement"
|
|
default: ""
|
|
required:
|
|
- path
|
|
- old
|
|
- new
|
|
steps:
|
|
- backend: edit_step
|
|
|
|
append:
|
|
backend: base
|
|
description: "Append content to a markdown file."
|
|
parameters:
|
|
type: object
|
|
properties:
|
|
path:
|
|
type: string
|
|
description: "vault-relative path"
|
|
content:
|
|
type: string
|
|
description: "content to append"
|
|
required:
|
|
- path
|
|
- content
|
|
steps:
|
|
- backend: append_step
|
|
|
|
frontmatter:update:
|
|
backend: base
|
|
description: "Merge keys into a file's YAML frontmatter."
|
|
parameters:
|
|
type: object
|
|
properties:
|
|
path:
|
|
type: string
|
|
description: "vault-relative path"
|
|
metadata:
|
|
type: object
|
|
description: "keys to merge"
|
|
additionalProperties: true
|
|
required:
|
|
- path
|
|
- metadata
|
|
steps:
|
|
- backend: frontmatter_update_step
|
|
|
|
frontmatter:delete:
|
|
backend: base
|
|
description: "Drop keys from a file's YAML frontmatter."
|
|
parameters:
|
|
type: object
|
|
properties:
|
|
path:
|
|
type: string
|
|
description: "vault-relative path"
|
|
keys:
|
|
type: array
|
|
description: "keys to remove"
|
|
items:
|
|
type: string
|
|
required:
|
|
- path
|
|
- keys
|
|
steps:
|
|
- backend: frontmatter_delete_step
|
|
|
|
# ── File Operations (relocate / cross-realm) ──────────────────────────────
|
|
move:
|
|
backend: base
|
|
description: "Move / rename a vault file; rewrites inbound wikilinks by default."
|
|
parameters:
|
|
type: object
|
|
properties:
|
|
src_path:
|
|
type: string
|
|
description: "vault-relative source"
|
|
dst_path:
|
|
type: string
|
|
description: "vault-relative destination"
|
|
overwrite:
|
|
type: boolean
|
|
description: "overwrite if dst exists"
|
|
default: false
|
|
retarget:
|
|
type: boolean
|
|
description: "rewrite [[src]] → [[dst]] across the vault"
|
|
default: true
|
|
required:
|
|
- src_path
|
|
- dst_path
|
|
steps:
|
|
- backend: move_step
|
|
|
|
delete:
|
|
backend: base
|
|
description: "Delete a vault file or folder; returns surviving inbound wikilinks."
|
|
parameters:
|
|
type: object
|
|
properties:
|
|
path:
|
|
type: string
|
|
description: "vault-relative path"
|
|
required:
|
|
- path
|
|
steps:
|
|
- backend: delete_step
|
|
|
|
upload:
|
|
backend: base
|
|
description: "Copy a host file into the vault at an explicit destination."
|
|
parameters:
|
|
type: object
|
|
properties:
|
|
src_path:
|
|
type: string
|
|
description: "host absolute path"
|
|
dst_path:
|
|
type: string
|
|
description: "vault-relative destination"
|
|
overwrite:
|
|
type: boolean
|
|
description: "overwrite if dst exists"
|
|
default: false
|
|
required:
|
|
- src_path
|
|
- dst_path
|
|
steps:
|
|
- backend: upload_step
|
|
|
|
upload_resource:
|
|
backend: base
|
|
description: "Ingest an external-channel asset into resource/<today>/ with provenance."
|
|
parameters:
|
|
type: object
|
|
properties:
|
|
path:
|
|
type: string
|
|
description: "host source path"
|
|
channel:
|
|
type: string
|
|
description: "channel id (wechat / email / browser / api / ...)"
|
|
description:
|
|
type: string
|
|
description: "what the asset is and how to interpret it"
|
|
metadata:
|
|
type: object
|
|
description: "extra provenance keys (e.g. source)"
|
|
default: {}
|
|
required:
|
|
- path
|
|
- channel
|
|
- description
|
|
steps:
|
|
- backend: upload_resource_step
|
|
|
|
download:
|
|
backend: base
|
|
description: "Copy a vault file out to the host filesystem."
|
|
parameters:
|
|
type: object
|
|
properties:
|
|
src_path:
|
|
type: string
|
|
description: "vault-relative source"
|
|
dst_path:
|
|
type: string
|
|
description: "host absolute dest; empty = temp file"
|
|
default: ""
|
|
overwrite:
|
|
type: boolean
|
|
description: "overwrite if dst exists"
|
|
default: false
|
|
required:
|
|
- src_path
|
|
steps:
|
|
- backend: download_step
|
|
|
|
# ── Daily Operations (note CRUD + day-index rollup) ───────────────────
|
|
daily:read:
|
|
backend: base
|
|
description: "Read daily/<date>/<slug>.md (body + frontmatter)."
|
|
parameters:
|
|
type: object
|
|
properties:
|
|
slug:
|
|
type: string
|
|
description: "note slug"
|
|
date:
|
|
type: string
|
|
description: "ISO date; empty = today"
|
|
default: ""
|
|
required:
|
|
- slug
|
|
steps:
|
|
- backend: daily_read_step
|
|
|
|
daily:write:
|
|
backend: base
|
|
description: "Write daily/<date>/<slug>.md (body + frontmatter); refreshes the day index."
|
|
parameters:
|
|
type: object
|
|
properties:
|
|
slug:
|
|
type: string
|
|
description: "note slug"
|
|
body:
|
|
type: string
|
|
description: "note body"
|
|
default: ""
|
|
frontmatter:
|
|
type: object
|
|
description: "frontmatter dict; defaults to {name: <slug>}"
|
|
default: {}
|
|
date:
|
|
type: string
|
|
description: "ISO date; empty = today"
|
|
default: ""
|
|
overwrite:
|
|
type: boolean
|
|
description: "false = skip if exists; true = replace"
|
|
default: false
|
|
refresh_index:
|
|
type: boolean
|
|
description: "refresh daily/<date>.md after write"
|
|
default: true
|
|
required:
|
|
- slug
|
|
steps:
|
|
- backend: daily_write_step
|
|
|
|
daily:list:
|
|
backend: base
|
|
description: "List notes under a single day."
|
|
parameters:
|
|
type: object
|
|
properties:
|
|
date:
|
|
type: string
|
|
description: "ISO date; empty = today"
|
|
default: ""
|
|
steps:
|
|
- backend: daily_list_step
|
|
|
|
daily:reindex:
|
|
backend: base
|
|
description: "Rebuild the day-index page daily/<date>.md."
|
|
parameters:
|
|
type: object
|
|
properties:
|
|
date:
|
|
type: string
|
|
description: "ISO date; empty = today"
|
|
default: ""
|
|
steps:
|
|
- backend: daily_reindex_step
|
|
|
|
watch_file:
|
|
backend: background
|
|
watch_paths:
|
|
- MEMORY.md
|
|
- memory
|
|
suffix_filters:
|
|
- md
|
|
steps:
|
|
- backend: update_store_step
|
|
- backend: watch_changes_step
|
|
|
|
components:
|
|
tokenizer:
|
|
default:
|
|
backend: regex
|
|
|
|
embedding_model:
|
|
default:
|
|
backend: ${EMBEDDING_BACKEND:-openai}
|
|
api_key: ${EMBEDDING_API_KEY:-}
|
|
base_url: ${EMBEDDING_BASE_URL:-https://api.openai.com/v1}
|
|
model_name: ${EMBEDDING_MODEL_NAME:-text-embedding-v4}
|
|
dimensions: 1024
|
|
|
|
file_graph:
|
|
default:
|
|
backend: local
|
|
|
|
file_parser:
|
|
linked:
|
|
backend: linked
|
|
supported_extensions:
|
|
- md
|
|
chunked:
|
|
backend: chunked
|
|
supported_extensions:
|
|
- txt
|
|
- html
|
|
- json
|
|
- yaml
|
|
- py
|
|
default:
|
|
backend: default
|
|
|
|
keyword_index:
|
|
default:
|
|
backend: bm25
|
|
tokenizer: default
|
|
|
|
file_store:
|
|
default:
|
|
backend: local
|
|
store_name: local
|
|
embedding_model: default
|
|
keyword_index: default
|
|
file_graph: default
|
|
|
|
# as_llm / formatter aren't required for atomic primitives; configure
|
|
# only if you'll invoke digester/synchronizer or other LLM-driven
|
|
# paths from the dev server.
|
|
# as_llm:
|
|
# default:
|
|
# backend: ${LLM_BACKEND:-openai}
|
|
# api_key: ${LLM_API_KEY:-}
|
|
# model_name: ${LLM_MODEL_NAME:-gpt-4o-mini}
|
|
# client_kwargs:
|
|
# base_url: ${LLM_BASE_URL:-https://api.openai.com/v1}
|
|
#
|
|
# as_llm_formatter:
|
|
# default:
|
|
# backend: ${LLM_BACKEND:-openai}
|