Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ cargo clippy --all-targets -- -D warnings
| `aish-security` | Security policy engine with glob-to-regex pattern matching |
| `aish-skills` | Skill plugin discovery with hot-reload via notify |
| `aish-memory` | Markdown-based long-term memory with relevance scoring |
| `aish-tools` | Built-in tools: bash, fs (read/write/edit), ask_user, memory, skill |
| `aish-tools` | Built-in tools: bash, WebFetch, fs (read/write/edit), ask_user, memory, skill |
| `aish-scripts` | .aish script system with frontmatter, ai "prompt" syntax, hooks |
| `aish-shell` | Main shell: REPL loop, AI handler, built-in commands, animation |
| `aish-cli` | CLI entry point with clap derive macros |
Expand Down
2 changes: 1 addition & 1 deletion README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ cargo clippy
| `aish-security` | 安全策略引擎,glob-to-regex 模式匹配 |
| `aish-skills` | 技能插件发现,notify 热加载 |
| `aish-memory` | Markdown 长期记忆,相关性评分 |
| `aish-tools` | 内置工具:bash、文件读写编辑、ask_user、memory、skill |
| `aish-tools` | 内置工具:bash、WebFetch、文件读写编辑、ask_user、memory、skill |
| `aish-scripts` | .aish 脚本系统,frontmatter、ai "prompt" 语法、hooks |
| `aish-shell` | 主 Shell:REPL 循环、AI 处理器、内置命令、动画 |
| `aish-cli` | CLI 入口,clap derive 宏 |
Expand Down
20 changes: 0 additions & 20 deletions crates/aish-i18n/locales/de-DE.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -353,25 +353,9 @@ security:

tools:
ask_user:
description: "Stellt dem Benutzer eine gezielte Rückfrage. Nur mit prompt wird Texteingabe verwendet; mit options werden Auswahlmöglichkeiten angeboten."
unknown_kind: "Unbekannter Typ: {kind}"
runtime_not_configured: "ask_user-Laufzeit ist nicht konfiguriert"
execute_failed: "ask_user fehlgeschlagen: {error}"
param:
kind: "Interaktionstyp: text_input für freie Eingabe, choice_or_text für Auswahl mit eigener Eingabe"
prompt: "Die Frage, die dem Benutzer gestellt wird."
options: "Optionale Auswahlmöglichkeiten. Wenn sie fehlen oder leer sind, verwendet ask_user Texteingabe."
option_value: "Stabiler Optionswert in den Tool-Metadaten."
option_label: "Für den Benutzer sichtbare Bezeichnung in der Auswahlliste."
option_description: "Optionale Zusatzbeschreibung unterhalb der Option."
option_recommended: "Markiert diese Option sichtbar als empfohlene Vorgabe."
title: "Optionaler Titel für die Frage"
default: "Standardwert"
placeholder: "Platzhaltertext"
allow_freeform_input: "Erlaubt bei vorhandenen Optionen eine benutzerdefinierte Antwort. Standard ist true."
required: "Ob der Benutzer eine Antwort geben muss (Standard: true)"
allow_cancel: "Ob der Benutzer abbrechen/überspringen darf (Standard: true)"
min_length: "Minimale Länge für Texteingabe (Standard: 0)"
validation:
prompt_empty: "prompt darf nicht leer sein"
option_value_empty: "option value darf nicht leer sein"
Expand All @@ -388,10 +372,6 @@ tools:
cancelled: "Benutzer hat die Frage abgebrochen."

smart_log:
description: "Ermittelt automatisch Log-Quellen, analysiert Protokolle anhand der Anfrage und gibt eine passende Zusammenfassung zurück."
param:
query: "Ihre Diagnoseanfrage, z. B. 'ist nginx korrekt konfiguriert' oder 'gibt es verdächtige Anmeldungen'."
path: "Optional. Log-Pfad (Datei/Verzeichnis) oder ein systemd-Unit-Name. Wenn nicht angegeben, wird er aus der Anfrage abgeleitet."
summary:
file: "[DATEI] {ident}: {matched}/{total} Zeilen passend\nBeispiel:\n{sample}"
dir: "[VERZ] {path}: {matched}/{total} Zeilen passend\nBeispiel:\n{sample}"
Expand Down
80 changes: 13 additions & 67 deletions crates/aish-i18n/locales/en-US.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -632,10 +632,6 @@ security:

tools:
smart_log:
description: "Automatically determine log sources, analyze logs based on the query, and return a matched summary."
param:
query: "Your diagnostic query, e.g. 'is nginx configured correctly' or 'are there suspicious logins'."
path: "Optional. Log path (file/dir) or a systemd unit name. If omitted, it will be inferred from the query."
summary:
file: "[FILE] {ident}: matched {matched}/{total} lines\nSample:\n{sample}"
dir: "[DIR] {path}: matched {matched}/{total} lines\nSample:\n{sample}"
Expand All @@ -644,74 +640,42 @@ tools:
no_logs_found: "No logs or matching information found."

bash:
description: "Execute a bash command and return the output. Use this tool to run shell commands. IMPORTANT: Each command requires user confirmation. If the user rejects (N) or cancels (Ctrl+C) a command, you MUST NOT retry the same or similar command — acknowledge the cancellation and adjust your approach instead."
security_handling_required: "bash command requires {level} security handling"
param:
command: "The bash command to execute"
timeout: "Timeout in seconds (default: 120)"
missing_command: "Missing 'command' parameter"
execute_failed: "Failed to execute: {error}"
output_truncated: "[...{bytes} bytes truncated...]\n{tail}"
truncated_notice: "[...{bytes} bytes truncated...]"

fs:
read_file:
description: "Read the content of a file"
param:
path: "Path to the file to read"
offset: "Line offset to start reading from (0-based)"
limit: "Maximum number of lines to read"
missing_path: "Missing 'path' parameter"
read_failed: "Failed to read {path}: {error}"
file_too_large: "File {path} is {size} bytes, exceeding the {limit} byte (32KB) limit"
decode_failed: "Failed to decode {path} as UTF-8: {error}"
empty_file: "(empty file)"
offset_exceeds_length: "Offset {offset} exceeds file length ({length})"
access_denied: "Access denied: path is not inside offload directory"
write_file:
description: "Write content to a file (creates or overwrites)"
param:
path: "Path to the file to write"
content: "Content to write"
missing_path: "Missing 'path' parameter"
missing_content: "Missing 'content' parameter"
content_too_large: "Content for {path} is {size} bytes, exceeding the {limit} byte (32KB) limit"
create_dirs_failed: "Failed to create parent dirs: {error}"
write_success: "Wrote {bytes} bytes to {path}"
write_failed: "Failed to write {path}: {error}"
edit_file:
description: "Edit a file by replacing a specific string with a new string"
param:
path: "Path to the file"
old_string: "The text to replace"
new_string: "The replacement text"
replace_all: "Replace all occurrences (default: false)"
missing_path: "Missing 'path' parameter"
missing_old_string: "Missing 'old_string' parameter"
missing_new_string: "Missing 'new_string' parameter"
edit_read_failed: "Failed to read {path}: {error}"
file_too_large: "File {path} is {size} bytes, exceeding the {limit} byte (32KB) limit"
old_string_not_found: "'old_string' not found in {path}"
old_string_ambiguous: "'old_string' appears {count} times in {path} - use replace_all=true or provide more context"
edit_success: "Edited {path}"
edit_write_failed: "Failed to write {path}: {error}"

ask_user:
description: "Ask the user a focused clarifying question. Use prompt for text input, and add options when you can offer choices."
runtime_not_configured: "ask_user runtime is not configured"
execute_failed: "ask_user failed: {error}"
param:
kind: "Interaction type: text_input for free-form, choice_or_text for options with custom input"
prompt: "The question to ask the user."
options: "Optional choices to offer the user. If omitted or empty, ask_user uses text input."
option_value: "Stable option value returned in tool metadata."
option_label: "User-facing label shown in the choice list."
option_description: "Optional extra detail shown below the option."
option_recommended: "Mark this option visibly as the recommended default."
title: "Optional title for the question"
default: "Default value"
placeholder: "Placeholder text"
allow_freeform_input: "When options are present, allow the user to choose Other and type a custom answer. Defaults to true."
required: "Whether the user must provide an answer (default: true)"
allow_cancel: "Whether the user can cancel/skip (default: true)"
min_length: "Minimum length for text input (default: 0)"
validation:
prompt_empty: "prompt cannot be empty"
option_value_empty: "option value cannot be empty"
Expand Down Expand Up @@ -742,13 +706,6 @@ tools:
options_not_empty: "options must be a non-empty list for choice_or_text"

memory:
description: "Search, store, or manage long-term memories. Use 'search' to find relevant past knowledge, 'store' to save important information, 'list' to see recent memories, 'forget' to remove outdated info."
param:
action: "Memory operation to perform"
query: "Search query (for 'search' action)"
content: "Content to store (for 'store' action)"
category: "Category for stored memory (default: other)"
memory_id: "Memory ID to forget (for 'forget' action)"
missing_action: "Missing 'action' parameter"
unknown_action: "Unknown action: {action}. Use search/store/forget/list."
search_missing_query: "Missing 'query' for search"
Expand All @@ -762,11 +719,6 @@ tools:
not_available: "memory not available"

host_note:
description: "Save, list, or delete notes about the current remote host. Use 'store' when the user tells you important facts about this server (services deployed, known issues, key paths, etc.). Use 'list' to review existing notes. Use 'forget' with a keyword to remove matching notes."
param:
action: "Note operation: store, list, or forget"
content: "Note content to save (for 'store' action)"
keyword: "Keyword to match notes for deletion (for 'forget' action)"
missing_action: "Missing 'action' parameter"
unknown_action: "Unknown action: {action}. Use store/list/forget."
store_missing_content: "Missing 'content' for store"
Expand All @@ -777,35 +729,29 @@ tools:
forgot_none: "No matching notes found."

python:
description: "Execute arbitrary Python code and return the result. Use print() for output."
param:
code: "The Python code to execute."
missing_code: "Missing 'code' parameter"
not_installed: "Python 3 is not installed or not in PATH."
execute_failed: "Failed to execute Python: {error}"
no_output: "Python code executed successfully with no output."

grep:
description: "Search for patterns in files using regex"
param:
pattern: "Regular expression pattern to search for"
path: "File or directory to search in"
recursive: "Search recursively in directories"
case_insensitive: "Case insensitive search"
invert_match: "Show lines that do not match"
line_numbers: "Show line numbers"
count_only: "Only show count of matching lines"
missing_pattern: "Missing 'pattern' parameter"
invalid_regex: "Error: invalid regex pattern: {error}"

glob:
description: "Find files matching glob patterns"
param:
pattern: "Glob pattern to match files"
path: "Base directory to search in (default: current directory)"
missing_pattern: "Missing 'pattern' parameter"
invalid_glob: "Error: invalid glob pattern: {error}"

web_fetch:
missing_url: "Missing 'url' parameter"
missing_prompt: "Missing 'prompt' parameter"
invalid_url: "Error: invalid URL. Provide a fully-qualified http or https URL without credentials."
blocked_private_host: "Blocked WebFetch request to private or local host: {host}"
confirm_fetch: "Allow WebFetch to fetch content from {host}?"
content_too_large: "WebFetch response exceeded the 10MB limit"
binary_unsupported: "WebFetch does not support binary content in this version"
secondary_model_failed: "WebFetch fetched the page but failed to process it with the secondary model: {error}"

help:
labels:
usage: "Usage"
Expand Down
20 changes: 0 additions & 20 deletions crates/aish-i18n/locales/es-ES.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -353,25 +353,9 @@ security:

tools:
ask_user:
description: "Haz al usuario una pregunta de aclaración enfocada. Con solo prompt se usa texto libre; con options se ofrecen elecciones."
unknown_kind: "Tipo desconocido: {kind}"
runtime_not_configured: "el runtime de ask_user no está configurado"
execute_failed: "ask_user falló: {error}"
param:
kind: "Tipo de interacción: text_input para texto libre, choice_or_text para opciones con entrada personalizada"
prompt: "La pregunta que se le hará al usuario."
options: "Opciones que se pueden ofrecer al usuario. Si faltan o están vacías, ask_user usa entrada de texto."
option_value: "Valor estable de la opción que se devuelve en los metadatos de la herramienta."
option_label: "Etiqueta visible para el usuario en la lista de opciones."
option_description: "Detalle opcional que se muestra debajo de la opción."
option_recommended: "Marca esta opción visiblemente como la recomendada."
title: "Título opcional para la pregunta"
default: "Valor predeterminado"
placeholder: "Texto de marcador"
allow_freeform_input: "Cuando hay opciones, permite elegir otra respuesta y escribirla. El valor predeterminado es true."
required: "Si el usuario debe proporcionar una respuesta (predeterminado: true)"
allow_cancel: "Si el usuario puede cancelar/omitir (predeterminado: true)"
min_length: "Longitud mínima para entrada de texto (predeterminado: 0)"
validation:
prompt_empty: "prompt no puede estar vacío"
option_value_empty: "option value no puede estar vacío"
Expand All @@ -388,10 +372,6 @@ tools:
cancelled: "El usuario canceló la pregunta."

smart_log:
description: "Determina automáticamente las fuentes de registros, analiza los logs según la consulta y devuelve un resumen coincidente."
param:
query: "Tu consulta de diagnóstico, por ejemplo 'nginx está bien configurado' o 'hay inicios de sesión sospechosos'."
path: "Opcional. Ruta del log (archivo/directorio) o nombre de una unidad systemd. Si se omite, se inferirá a partir de la consulta."
summary:
file: "[ARCHIVO] {ident}: {matched}/{total} líneas coincidentes\nMuestra:\n{sample}"
dir: "[DIR] {path}: {matched}/{total} líneas coincidentes\nMuestra:\n{sample}"
Expand Down
20 changes: 0 additions & 20 deletions crates/aish-i18n/locales/fr-FR.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -353,25 +353,9 @@ security:

tools:
ask_user:
description: "Poser a l'utilisateur une question de clarification ciblee. Avec seulement prompt, ask_user utilise la saisie texte ; avec options, il propose des choix."
unknown_kind: "Type inconnu : {kind}"
runtime_not_configured: "le runtime ask_user n'est pas configure"
execute_failed: "echec de ask_user : {error}"
param:
kind: "Type d'interaction : text_input pour saisie libre, choice_or_text pour options avec saisie personnalisee"
prompt: "La question a poser a l'utilisateur."
options: "Choix optionnels a proposer a l'utilisateur. S'ils sont absents ou vides, ask_user utilise la saisie texte."
option_value: "Valeur stable de l'option retournee dans les metadonnees de l'outil."
option_label: "Libelle affiche a l'utilisateur dans la liste."
option_description: "Detail optionnel affiche sous l'option."
option_recommended: "Marque visiblement cette option comme recommandee."
title: "Titre optionnel pour la question"
default: "Valeur par defaut"
placeholder: "Texte indicatif"
allow_freeform_input: "Quand des options sont presentes, autorise une reponse personnalisee. La valeur par defaut est true."
required: "Indique si l'utilisateur doit fournir une reponse (par defaut : true)"
allow_cancel: "Indique si l'utilisateur peut annuler/ignorer (par defaut : true)"
min_length: "Longueur minimale pour la saisie texte (par defaut : 0)"
validation:
prompt_empty: "prompt ne peut pas etre vide"
option_value_empty: "option value ne peut pas etre vide"
Expand All @@ -388,10 +372,6 @@ tools:
cancelled: "L'utilisateur a annule la question."

smart_log:
description: "Determine automatiquement les sources de journaux, analyse les logs selon la requete et renvoie un resume correspondant."
param:
query: "Votre requete de diagnostic, par exemple 'nginx est-il correctement configure' ou 'y a-t-il des connexions suspectes'."
path: "Optionnel. Chemin du journal (fichier/repertoire) ou nom d'une unite systemd. S'il est omis, il sera deduit de la requete."
summary:
file: "[FICHIER] {ident} : {matched}/{total} lignes correspondantes\nExemple :\n{sample}"
dir: "[REP] {path} : {matched}/{total} lignes correspondantes\nExemple :\n{sample}"
Expand Down
20 changes: 0 additions & 20 deletions crates/aish-i18n/locales/ja-JP.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -353,25 +353,9 @@ security:

tools:
ask_user:
description: "ユーザーに焦点を絞った確認質問をします。prompt のみならテキスト入力、options があれば選択肢を提示します。"
unknown_kind: "不明な種類です: {kind}"
runtime_not_configured: "ask_user ランタイムが構成されていません"
execute_failed: "ask_user に失敗しました: {error}"
param:
kind: "操作タイプ: text_input は自由入力、choice_or_text は選択肢とカスタム入力"
prompt: "ユーザーに尋ねる質問です。"
options: "ユーザーに提示する任意の選択肢です。省略または空の場合、ask_user はテキスト入力を使います。"
option_value: "ツールメタデータに返される安定した選択肢の値です。"
option_label: "選択リストに表示されるユーザー向けラベルです。"
option_description: "選択肢の下に表示される任意の補足説明です。"
option_recommended: "この選択肢を推奨として明示表示します。"
title: "質問の任意タイトル"
default: "既定値"
placeholder: "プレースホルダーテキスト"
allow_freeform_input: "選択肢がある場合にカスタム回答を許可します。既定値は true です。"
required: "ユーザーが回答を入力する必要があるかどうか(既定値: true)"
allow_cancel: "ユーザーがキャンセル/スキップできるかどうか(既定値: true)"
min_length: "テキスト入力の最小文字数(既定値: 0)"
validation:
prompt_empty: "prompt は空にできません"
option_value_empty: "option value は空にできません"
Expand All @@ -388,10 +372,6 @@ tools:
cancelled: "ユーザーが質問をキャンセルしました。"

smart_log:
description: "ログソースを自動判定し、問い合わせに基づいてログを解析し、一致する要約を返します。"
param:
query: "診断したい内容。例: nginx は正しく設定されているか、怪しいログインはあるか。"
path: "任意。ログパス(ファイルまたはディレクトリ)または systemd ユニット名。省略時は問い合わせから推定します。"
summary:
file: "[FILE] {ident}: 一致 {matched}/{total} 行\nサンプル:\n{sample}"
dir: "[DIR] {path}: 一致 {matched}/{total} 行\nサンプル:\n{sample}"
Expand Down
Loading
Loading