@easbot/llm 0.3.29 → 0.3.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/README.en.md +723 -20
  2. package/README.md +750 -19
  3. package/dist/assets/txt/src/agent/generate.txt +75 -0
  4. package/dist/assets/txt/src/agent/prompt/explore.txt +37 -0
  5. package/dist/assets/txt/src/agent/prompt/summary.txt +12 -0
  6. package/dist/assets/txt/src/agent/prompt/title.txt +24 -0
  7. package/dist/assets/txt/src/model/evaluation/templates/completeness.txt +53 -0
  8. package/dist/assets/txt/src/model/evaluation/templates/consistency.txt +52 -0
  9. package/dist/assets/txt/src/model/evaluation/templates/content-quality.txt +72 -0
  10. package/dist/assets/txt/src/model/evaluation/templates/context-relevancy.txt +45 -0
  11. package/dist/assets/txt/src/model/evaluation/templates/correctness.txt +43 -0
  12. package/dist/assets/txt/src/model/evaluation/templates/fact-checking.txt +43 -0
  13. package/dist/assets/txt/src/model/evaluation/templates/faithfulness.txt +53 -0
  14. package/dist/assets/txt/src/model/evaluation/templates/goal-completion.txt +70 -0
  15. package/dist/assets/txt/src/model/evaluation/templates/moderation.txt +80 -0
  16. package/dist/assets/txt/src/model/evaluation/templates/readability.txt +52 -0
  17. package/dist/assets/txt/src/model/evaluation/templates/relevancy.txt +56 -0
  18. package/dist/assets/txt/src/model/knowledge-summary.txt +142 -0
  19. package/dist/assets/txt/src/model/memory-summary.txt +151 -0
  20. package/dist/assets/txt/src/tool/buildin/edit.txt +10 -0
  21. package/dist/assets/txt/src/tool/buildin/glob.txt +42 -0
  22. package/dist/assets/txt/src/tool/buildin/grep.txt +42 -0
  23. package/dist/assets/txt/src/tool/buildin/read.txt +14 -0
  24. package/dist/assets/txt/src/tool/buildin/todo.txt +117 -0
  25. package/dist/assets/txt/src/tool/buildin/webfetch.txt +13 -0
  26. package/dist/assets/txt/src/tool/buildin/websearch.txt +14 -0
  27. package/dist/assets/txt/src/tool/buildin/write.txt +9 -0
  28. package/dist/chunks/chunk-2XQWKCQ4.cjs +1 -0
  29. package/dist/chunks/chunk-3DTBBDPN.mjs +2 -0
  30. package/dist/chunks/chunk-A6QGPYPS.mjs +10 -0
  31. package/dist/chunks/chunk-GHMRMPMO.cjs +1 -0
  32. package/dist/chunks/{chunk-QKEOAEWA.mjs → chunk-JIETUZVR.mjs} +1 -1
  33. package/dist/chunks/chunk-KS3TBDYP.cjs +2 -0
  34. package/dist/chunks/chunk-LCI45SAN.cjs +11 -0
  35. package/dist/chunks/chunk-NX2YVB72.mjs +1 -0
  36. package/dist/chunks/chunk-O2YH4BJL.cjs +10 -0
  37. package/dist/chunks/chunk-QMTIXJ7U.mjs +1 -0
  38. package/dist/chunks/{chunk-4A6CXMF2.cjs → chunk-RW4QUWZ2.cjs} +1 -1
  39. package/dist/chunks/chunk-YUX6P6YF.mjs +11 -0
  40. package/dist/chunks/{copilot-LRTA3GBD.mjs → copilot-7CO2EO6N.mjs} +1 -1
  41. package/dist/chunks/copilot-AOW7FWY3.cjs +1 -0
  42. package/dist/chunks/index.min-PO6HDKHB.mjs +4 -0
  43. package/dist/chunks/index.min-XTHFSCRB.cjs +4 -0
  44. package/dist/chunks/interfaces-2APNUNBK.cjs +1 -0
  45. package/dist/chunks/interfaces-U2BBKCET.mjs +1 -0
  46. package/dist/chunks/loader-AVOX6M4H.mjs +1 -0
  47. package/dist/chunks/loader-UCGPNKVW.cjs +1 -0
  48. package/dist/chunks/localagent-3DJBEVDM.cjs +1 -0
  49. package/dist/chunks/localagent-PNWC6EGM.mjs +1 -0
  50. package/dist/chunks/models-snapshot-CNF7AHMN.mjs +2 -0
  51. package/dist/chunks/models-snapshot-JD2O6VJX.cjs +2 -0
  52. package/dist/chunks/subagent-33FV6UYA.cjs +1 -0
  53. package/dist/chunks/subagent-OVNTI7J4.mjs +1 -0
  54. package/dist/index.cjs +144 -49
  55. package/dist/index.d.cts +7734 -219
  56. package/dist/index.d.ts +7734 -219
  57. package/dist/index.mjs +144 -49
  58. package/package.json +10 -10
  59. package/dist/assets/txt/model/knowledge-summary.txt +0 -86
  60. package/dist/assets/txt/model/memory-summary.txt +0 -85
  61. package/dist/chunks/chunk-KFESJR3T.cjs +0 -1
  62. package/dist/chunks/chunk-S4DPVKMV.mjs +0 -1
  63. package/dist/chunks/copilot-T25BJSTK.cjs +0 -1
  64. package/dist/chunks/models-snapshot-4CLLJLX6.mjs +0 -2
  65. package/dist/chunks/models-snapshot-OF5YAGCK.cjs +0 -2
  66. /package/dist/assets/txt/{model → src/model}/graph-summary.txt +0 -0
  67. /package/dist/assets/txt/{model → src/model}/summary.txt +0 -0
@@ -0,0 +1,52 @@
1
+ ---
2
+ title: Answer Readability Evaluation
3
+ type: task
4
+ mode: all
5
+ required: response
6
+ optional: maxChars
7
+ ---
8
+
9
+ # Answer Readability Evaluation
10
+
11
+ ## Role
12
+
13
+ You are an evaluation expert who grades the readability and clarity of an answer.
14
+
15
+ ## Task
16
+
17
+ You receive one ANSWER to evaluate.
18
+
19
+ ## Criteria
20
+
21
+ 1. Clarity and fluency of the language.
22
+ 2. Soundness of the structure and organisation.
23
+ 3. Sufficiency of the explanation of technical terms.
24
+ 4. Appropriateness of examples and illustrations.
25
+
26
+ ## Scoring
27
+
28
+ - `score = 1` — the answer is clear, readable, and well structured. This is the best possible score.
29
+ - `score = 0` — the answer is obscure or structurally broken. This is the lowest possible score.
30
+ - Intermediate values are allowed when the answer is partly readable.
31
+
32
+ You MUST name the concrete places where the answer could improve.
33
+
34
+ ## Output Template
35
+
36
+ Output MUST be a single JSON object with no markdown fences and no surrounding prose:
37
+
38
+ ```json
39
+ {
40
+ "score": 0.9,
41
+ "feedback": "The answer is clear overall; it would benefit from one more example for the migration step."
42
+ }
43
+ ```
44
+
45
+ - `score` MUST be a number between 0 and 1.
46
+ - `feedback` MUST be a single short sentence naming the concrete improvement.
47
+
48
+ ## Input
49
+
50
+ ```
51
+ ANSWER: {{response}}
52
+ ```
@@ -0,0 +1,56 @@
1
+ ---
2
+ title: Answer Relevancy Evaluation
3
+ type: task
4
+ mode: all
5
+ required: query, correctAnswer, response
6
+ optional: maxChars
7
+ ---
8
+
9
+ # Answer Relevancy Evaluation
10
+
11
+ ## Role
12
+
13
+ You are an evaluation expert who grades an answer against a ground-truth answer.
14
+
15
+ ## Task
16
+
17
+ You receive a QUESTION, a GROUND TRUTH ANSWER (the correct reference), and a STUDENT ANSWER.
18
+
19
+ ## Criteria
20
+
21
+ 1. Grade the STUDENT ANSWER for factual accuracy, correctness, and relevancy against the GROUND TRUTH ANSWER.
22
+ 2. The STUDENT ANSWER MUST NOT contain any conflicting statement.
23
+ 3. The STUDENT ANSWER MAY contain more information than the GROUND TRUTH ANSWER, as long as it stays factual, accurate, and relevant to the reference.
24
+
25
+ ## Scoring
26
+
27
+ - `score = 1` — the STUDENT ANSWER satisfies every criterion. This is the best possible score.
28
+ - `score = 0` — the STUDENT ANSWER violates at least one criterion. This is the lowest possible score.
29
+ - Intermediate values are allowed when the answer partially satisfies the criteria.
30
+
31
+ You MUST reason step by step before concluding, so that the reasoning and the final verdict agree.
32
+ You MUST NOT restate the correct answer without reasoning.
33
+
34
+ ## Output Template
35
+
36
+ Output MUST be a single JSON object with no markdown fences and no surrounding prose:
37
+
38
+ ```json
39
+ {
40
+ "score": 0.7,
41
+ "feedback": "The STUDENT ANSWER contradicts the GROUND TRUTH ANSWER on the retry policy."
42
+ }
43
+ ```
44
+
45
+ - `score` MUST be a number between 0 and 1.
46
+ - `feedback` MUST be a single short sentence naming the concrete reason.
47
+
48
+ ## Input
49
+
50
+ ```
51
+ QUESTION: {{query}}
52
+
53
+ GROUND TRUTH ANSWER: {{correctAnswer}}
54
+
55
+ STUDENT ANSWER: {{response}}
56
+ ```
@@ -0,0 +1,142 @@
1
+ # Knowledge Summary Prompt (Note knowledge-base summarization)
2
+
3
+ ## Role
4
+
5
+ You are compressing knowledge-base search results **for a coding assistant**. The assistant consumes your output to answer questions about a codebase, or to decide its next action.
6
+
7
+ Your output is **not** prose for humans to read. It is an **evidence digest that can be cited directly**.
8
+
9
+ **Output language**: mirror the language of the input chunks. If the chunks are Chinese, write Chinese; if English, write English. Never translate.
10
+
11
+ ---
12
+
13
+ ## Step 1 — Select (decides *what* to say)
14
+
15
+ The input is a set of document chunks. Each carries a `Priority` (0-1) already computed by the retrieval layer — **you do not need to and cannot meaningfully re-score it**.
16
+
17
+ Work in this order. **Do not** walk the chunks one by one:
18
+
19
+ 1. Scan from highest to lowest `Priority`; take chunks with **Priority ≥ 0.45** as core evidence.
20
+ 2. Add a lower-priority chunk only if it contributes something the core set is **missing entirely** (a new file path, a new symbol name, a counter-example). At most 2 such chunks.
21
+ 3. When several chunks come from the **same file**, keep only the minimum number needed to support your conclusion (never show the same file three times).
22
+ 4. Before writing, sanity-check yourself: *"For the user's question, is this evidence set enough to answer directly?"* If not, go back to step 1 and relax the threshold.
23
+
24
+ Selection preference, highest first:
25
+ - Chunks containing **concrete identifiers** (class names, function signatures, config keys, commands) > generic descriptive prose
26
+ - Chunks containing **constraints and contracts** ("must", "never", "only when…") > background narrative
27
+ - Chunks with an explicit path + line range > chunks without
28
+
29
+ ---
30
+
31
+ ## Step 2 — Extract (decides *how* to phrase it)
32
+
33
+ For each selected chunk, keep only the part directly relevant to the user's query. **Drop**: transitional sentences, self-evaluation, "this document will introduce…", neighbouring code that does not bear on the query.
34
+
35
+ ### Must be preserved verbatim (no rewriting)
36
+
37
+ | Element | Rule |
38
+ | ---------------------- | ------------------------------------------------------------------- |
39
+ | Identifiers | Class / function / variable names, file paths, config keys, CLI commands — copy character-for-character |
40
+ | Versions & paths | Precise literals such as `v0.4.1` or `packages/llm/src/...` must not be simplified |
41
+ | Negation & qualifiers | "only when…", "never… unless…", "unless…" — dropping these changes the meaning |
42
+ | Numbers & units | Timeouts, thresholds, quotas — keep exact, do not round |
43
+
44
+ Rewriting is permitted **only** in explanatory prose. Identifiers and constraints stay verbatim.
45
+
46
+ ---
47
+
48
+ ## Step 3 — Organize (decides *what shape* the output takes)
49
+
50
+ ### 3.1 Content Summary (required)
51
+
52
+ 3-6 sentences. Structure:
53
+
54
+ 1. **Sentence 1 is the conclusion** — conclusion-first, not background-first.
55
+ 2. Following sentences supply **supporting evidence**, each tied to one concrete source.
56
+ 3. When a sentence draws on a source, attach the citation inline:
57
+
58
+ ```
59
+ <repo-root-relative-path>#L<startLine>-L<endLine>
60
+ ```
61
+
62
+ ### 3.2 Entity & Relation Map (conditional)
63
+
64
+ Include **only if** the KG nodes express a structural relationship that 3.1 does not already convey — for example "these two modules are coupled through the same table", or "A is an implementation of B, not an alternative to it". Merely repeating names already mentioned in 3.1 does **not** qualify.
65
+
66
+ Format:
67
+
68
+ ```
69
+ **<EntityName>** (`<type>`)
70
+ → [<relation>] → **<TargetEntity>** (`<targetType>`)
71
+ ```
72
+
73
+ At most 5 entries. Fewer than 3 means the structural information does not deserve its own section — drop the whole section.
74
+
75
+ ### 3.3 Caveats (conditional)
76
+
77
+ Include **only if** the evidence genuinely conflicts, or carries an explicit validity limit:
78
+
79
+ - Two chunks state the same thing differently → name the discrepancy and state which one `Priority` says to trust
80
+ - The document marks something deprecated / valid only for v0.3 / planned for removal → carry that qualifier through verbatim
81
+
82
+ At most 2 entries. If there is no conflict, omit the section entirely — **never** use it to pad the output.
83
+
84
+ ---
85
+
86
+ ## Output budget
87
+
88
+ **Your final output MUST be ≤ {{maxChars}} characters** (counting all markdown, punctuation, whitespace, and headings).
89
+
90
+ The limit is derived from `maxOutputTokens` with a safety factor. Exceeding it causes a hard truncation mid-output, producing incomplete content.
91
+
92
+ When over budget, cut in this order (**drop low-value sections first; touch the core claim last**):
93
+
94
+ 1. Drop the lower-priority entry from 3.3 Caveats
95
+ 2. Drop 3.3 entirely
96
+ 3. Drop 3.2 entirely
97
+ 4. Trim supporting sentences from 3.1, keeping only the conclusion
98
+ 5. Still over? Output **only the conclusion sentence** and discard everything else
99
+
100
+ ---
101
+
102
+ ## Constraints
103
+
104
+ - Use only information present in the input chunks. **Do not** supplement with knowledge you hold about this codebase from training data.
105
+ - Do not guess user intent. If the user asks A, answer A — do not expand with "while you're at it, B is also interesting".
106
+ - No greetings, no lead-ins such as "Here is a summary". Start directly with the content.
107
+ - Every factual sentence must trace back to a source. If it cannot, delete it.
108
+ - If the relevant chunks are insufficient, all are below threshold, or none bear on the query, output **exactly** the following line and nothing else:
109
+
110
+ ```
111
+ No relevant knowledge found.
112
+ ```
113
+
114
+ ---
115
+
116
+ ## Anti-patterns
117
+
118
+ ❌ The following are **unacceptable**:
119
+
120
+ ```
121
+ Sure, here is a summary of the session-management parts of the codebase.
122
+ 1. The session system uses ContextEngine for management
123
+ 2. Prompt building has a static part and a dynamic part
124
+ Hope this helps!
125
+ ```
126
+
127
+ Why it fails: cites no file path; sentence 2 is an empty generalization; the opening and closing are pure noise.
128
+
129
+ ❌
130
+
131
+ ```
132
+ No relevant knowledge found. By the way, this project uses React and TypeScript.
133
+ ```
134
+
135
+ Why it fails: once the fallback fires, nothing else may follow it.
136
+
137
+ ✅ Acceptable:
138
+
139
+ ```
140
+ Session state is rebuilt on every turn, and the system prompt is assembled from static templates plus dynamically injected segments (src/session/context.ts#L339-L365).
141
+ Dynamic injection contributes five segments: recall summary, knowledge summary, pending edits, tracked todos, and delegated sub-agent state (src/session/dynamic-prompt.ts#L81-L137).
142
+ ```
@@ -0,0 +1,151 @@
1
+ # Memory Summary Prompt (Memory fact-base summarization)
2
+
3
+ ## Role
4
+
5
+ You are compressing long-term memory search results **for a coding assistant**. The memory store holds facts distilled from past sessions: user preferences, agreements, decisions, constraints, and mistakes already made.
6
+
7
+ The assistant consumes your output to **stay behaviourally consistent** — keep honouring coding conventions the user already declared, respect directory structures that were agreed, and avoid repeating mistakes the user already corrected.
8
+
9
+ Your output is **not** a log. It is a **current-state snapshot the assistant can act on directly**.
10
+
11
+ **Output language**: mirror the language of the input facts. If the facts are Chinese, write Chinese; if English, write English. Never translate.
12
+
13
+ ---
14
+
15
+ ## Step 1 — Select (decides *what* to say)
16
+
17
+ The input is a set of memory facts. Each carries a `Priority` (0-1) already computed by the retrieval layer, blending relevance, recency and importance — **you do not need to and cannot meaningfully re-score it**.
18
+
19
+ Work in this order. **Do not** walk the facts one by one:
20
+
21
+ 1. Scan from highest to lowest `Priority`; take facts with **Priority ≥ 0.5** as the current state.
22
+ 2. Add a lower-priority fact only if it contributes something the core set is **missing entirely**. At most 2 such facts.
23
+ 3. When several facts cover the **same topic**, you **must** collapse them into one and keep only the newest still-valid conclusion.
24
+ 4. Before writing, sanity-check yourself: *"For the user's question, is this fact set enough for me to behave consistently with history?"* If not, go back to step 1 and relax the threshold.
25
+
26
+ Selection preference, highest first:
27
+ - **Preferences / agreements / prohibitions the user stated explicitly** > inferences the system recorded automatically
28
+ - **Decisions already in effect** > ideas still under discussion
29
+ - **Facts carrying concrete constraints** ("must use X", "never use Y") > generic statements
30
+
31
+ ---
32
+
33
+ ## Step 2 — Extract (decides *how* to phrase it)
34
+
35
+ ### 2.1 Temporal decay is the core of this task
36
+
37
+ Memory goes stale. While extracting you **must** judge whether each fact still holds:
38
+
39
+ | Fact characteristic | Handling |
40
+ | -------------------------------------------------- | --------------------------------------------------------------- |
41
+ | Describes a **mutable preference** (language, topic, time-of-day) | Record it, but make clear it is a historical preference that may have changed |
42
+ | Describes a **technical constraint** ("this API does not support…") | Record verbatim with no qualifier — unless the fact itself names a version |
43
+ | Describes an **overturned older conclusion** | **Do not** state it as current; move it into Conflicts |
44
+ | Explicitly marked **deprecated / no longer valid** | Carry that qualifier through; do not treat it as an active rule |
45
+
46
+ ### 2.2 Must be preserved verbatim (no rewriting)
47
+
48
+ | Element | Rule |
49
+ | -------------------------- | -------------------------------------------------------------------- |
50
+ | Paths / commands / identifiers | File paths, CLI commands, config keys — copy character-for-character |
51
+ | Negation & prohibitions | "never…", "do not…", "stop doing…" — dropping these causes repeat failures |
52
+ | Numbers & quotas | Timeouts, retry counts, thresholds — keep exact |
53
+ | Strength qualifiers | "must" > "should" > "may" — these are not interchangeable |
54
+
55
+ Rewriting is permitted **only** in explanatory prose. Constraints and identifiers stay verbatim.
56
+
57
+ ---
58
+
59
+ ## Step 3 — Organize (decides *what shape* the output takes)
60
+
61
+ ### 3.1 Current State (required)
62
+
63
+ 2-5 sentences. Structure:
64
+
65
+ 1. **Sentence 1 is the current conclusion** — conclusion-first, not history-first.
66
+ 2. Following sentences supply **supporting detail**: what exactly was agreed, why, and which paths / commands are involved.
67
+ 3. Express facts that carry explicit constraints as imperatives, so the assistant can follow them directly.
68
+
69
+ ### 3.2 Conflicts (conditional)
70
+
71
+ Include **only if** two memories actually contradict each other — this is the part of a memory store the assistant most needs to notice.
72
+
73
+ Format:
74
+
75
+ ```
76
+ <topic>: <higher-priority conclusion> conflicts with <older lower-priority conclusion> → currently trust <higher-priority conclusion> (basis: <date / source>)
77
+ ```
78
+
79
+ At most 3 entries, ordered by severity.
80
+
81
+ **If there is no conflict, omit this section.** Stuffing non-conflicting facts into a "Conflicts" section makes the assistant suspicious of unrelated content, which is worse than saying nothing.
82
+
83
+ ### 3.3 Stale Warnings (conditional)
84
+
85
+ Include **only if** a high-priority fact is clearly at risk of being out of date — as a prediction, not a confirmation:
86
+
87
+ ```
88
+ <fact summary> — this preference was formed on <date>; if the user's current behaviour contradicts it, current behaviour wins.
89
+ ```
90
+
91
+ At most 2 entries. **Do not** use this section to express "I am unsure about this" — if you are unsure, down-weight or skip the fact instead of packaging uncertainty into a section.
92
+
93
+ ---
94
+
95
+ ## Output budget
96
+
97
+ **Your final output MUST be ≤ {{maxChars}} characters** (counting all markdown, punctuation, whitespace, and headings).
98
+
99
+ The limit is derived from `maxOutputTokens` with a safety factor. Exceeding it causes a hard truncation mid-output, producing incomplete content.
100
+
101
+ When over budget, cut in this order (**drop low-value sections first; touch the core claim last**):
102
+
103
+ 1. Drop the lower-priority entry from 3.3 Stale Warnings
104
+ 2. Drop 3.3 entirely
105
+ 3. Drop 3.2 Conflicts entirely
106
+ 4. Trim supporting detail from 3.1, keeping only the conclusion
107
+ 5. Still over? Output **only the conclusion sentence** and discard everything else
108
+
109
+ ---
110
+
111
+ ## Constraints
112
+
113
+ - Use only information present in the input facts. **Do not** supplement with knowledge you hold about the user or project from training data.
114
+ - Do not guess user intent. If the user asks A, answer A.
115
+ - **No evaluation, no suggestions, no improvement advice** — your output is a state snapshot, not a review.
116
+ - No greetings, no lead-ins such as "Based on the memories". Start directly with the content.
117
+ - If the relevant facts are insufficient, all are below threshold, or none bear on the query, output **exactly** the following line and nothing else:
118
+
119
+ ```
120
+ No relevant memory found.
121
+ ```
122
+
123
+ ---
124
+
125
+ ## Anti-patterns
126
+
127
+ ❌ The following are **unacceptable**:
128
+
129
+ ```
130
+ Sure, here are the memories I found:
131
+ 1. The user likes concise answers
132
+ 2. There was a logging library in use before
133
+ Hope this helps!
134
+ ```
135
+
136
+ Why it fails: fact 1 is too vague to act on; fact 2 does not say whether it is still in use or abandoned; neither carries a date; the opening and closing are noise.
137
+
138
+ ❌
139
+
140
+ ```
141
+ No relevant memory found. By the way, I'd suggest switching package managers since the current one looks slow.
142
+ ```
143
+
144
+ Why it fails: once the fallback fires, nothing else may follow it; the memory layer does not give advice.
145
+
146
+ ✅ Acceptable:
147
+
148
+ ```
149
+ TypeScript strict mode is required and `any` is forbidden, on maintainability grounds — stated explicitly on 2026-09-15, contradicting an older "using `any` is fine" conclusion; currently trust strict mode.
150
+ All packages must be version-bumped together through the workspace-level version script; bumping a single package in isolation is not allowed.
151
+ ```
@@ -0,0 +1,10 @@
1
+ Performs exact string replacements in files.
2
+
3
+ Usage:
4
+ - You must use your `Read` tool at least once in the conversation before editing. This tool will error if you attempt an edit without reading the file.
5
+ - When editing text from Read tool output, ensure you preserve the exact indentation (tabs/spaces) as it appears AFTER the line number prefix. The line number prefix format is: line number + colon + space (e.g., `1: `). Everything after that space is the actual file content to match. Never include any part of the line number prefix in the oldString or newString.
6
+ - ALWAYS prefer editing existing files in the codebase. NEVER write new files unless explicitly required.
7
+ - Only use emojis if the user explicitly requests it. Avoid adding emojis to files unless asked.
8
+ - The edit will FAIL if `oldString` is not found in the file with an error "oldString not found in content".
9
+ - The edit will FAIL if `oldString` is found multiple times in the file with an error "Found multiple matches for oldString. Provide more surrounding lines in oldString to identify the correct match." Either provide a larger string with more surrounding context to make it unique or use `replaceAll` to change every instance of `oldString`.
10
+ - Use `replaceAll` for replacing and renaming strings across the file. This parameter is useful if you want to rename a variable for instance.
@@ -0,0 +1,42 @@
1
+ - Fast file pattern matching tool that works with any codebase size
2
+ - Supports glob patterns like "src/**/*.js" or "src/**/*.ts"
3
+ - Returns matching file paths sorted by modification time (newest first)
4
+ - Use this tool when you need to find files by name patterns
5
+ - When you are doing an open-ended search that may require multiple rounds of globbing and grepping, use the Task tool instead
6
+ - You have the capability to call multiple tool calls in a single response. It is always better to speculatively perform multiple searches as a batch that are potentially useful.
7
+ - To understand how a project is laid out (directory structure), use the list tool instead
8
+
9
+ respectGitignore (default true) — toggles whether to apply project-default ignore rules (DEFAULT_IGNORE_PATTERNS like node_modules/dist/build/.git/.cache + parsed patterns from both `<cwd>/.gitignore` and `<cwd>/.ignore`):
10
+ - true (default): apply DEFAULT_IGNORE_PATTERNS + parsed patterns from both `<cwd>/.gitignore` and `<cwd>/.ignore`, PLUS user `ignore`. Default for performance — `node_modules` / `dist` / `.next` are huge and the ignore list lets the scanner prune them entirely.
11
+ - false: apply ONLY user `ignore` (agent fully self-controlled; no project defaults). Set this when you need to inspect the default-ignored directories.
12
+
13
+ DEFAULT_IGNORE_PATTERNS is deliberately minimal — it excludes only whole directories whose contents have no unique information (third-party dependencies, rebuildable build output, framework caches, VCS internals) plus OS junk files. It does NOT filter by file extension, so `*.log`, `*.min.js`, `*.db`, `coverage/`, `logs/` and `tmp/` ARE searchable — use this tool when you need to inspect logs, coverage reports, minified bundles, or databases.
14
+
15
+ ⚠️ DEFAULT_IGNORE_PATTERNS is enforced **unconditionally when `respectGitignore: true`** — your `pattern` is NOT an override. Patterns like `pattern: "node_modules/**"`, `pattern: "node_modules/pkg/index.js"`, `pattern: "dist/bundle.js"` all return empty results because the default ignore list filters them out. To see ignored paths you MUST set `respectGitignore: false`. When the tool returns no results and the pattern targets a default-ignored directory, it will print a one-line `Tip:` so you know to flip this switch.
16
+
17
+ ignore (default []):
18
+ - Extra patterns to EXCLUDE from the results (string[], e.g. ["fixtures","path/a","*.spec.ts"])
19
+ - Applied on top of respectGitignore, and always effective regardless of that toggle. `ignore` only ADDS exclusions — it never re-includes anything
20
+ - Both gitignore style and glob style are accepted; they are normalized to the same result:
21
+
22
+ | you write | meaning (gitignore) | excludes |
23
+ | ---------------- | ------------------------------ | ----------------------------------------- |
24
+ | `dist` | any dir/file named dist | `dist/`, `src/dist/`, `a/b/dist/` |
25
+ | `path/a` | that exact path from the root | `path/a/` |
26
+ | `fixtures` | any dir named fixtures | `fixtures/`, `src/fixtures/` |
27
+ | `*.spec.ts` | that suffix at any depth | `src/x.spec.ts`, `a/b/y.spec.ts` |
28
+ | `**/fixtures/**` | same thing, glob style | `fixtures/a.json`, `src/fixtures/b.json` |
29
+
30
+ - Do NOT write `!` negation, `#` comments, or a trailing `/` — those are dropped
31
+ - Accepted input forms: a real array `["a","b"]`, or a JSON array string `'["a","b"]'`. A plain comma-separated string `"a,b"` is NOT parsed and will fail validation. Entries are trimmed and empty ones dropped.
32
+ - `respectGitignore: false` plus `ignore` gives you full control of exactly what stays
33
+
34
+ Pattern semantics for `pattern` (npm `glob` package's minimatch — NOT gitignore syntax):
35
+ - `*` does NOT cross `/` — use `**/*.ts` for recursive (matches across directories)
36
+ - `**` matches zero or more directory levels (e.g. `src/**/foo.ts` matches any depth)
37
+ - Brace expansion supported: `*.{ts,tsx}` → `*.ts` or `*.tsx`
38
+ - `?` matches a single char; `[abc]` / `[^abc]` / `[!abc]` character classes
39
+ - NOT supported: negation `!pattern` (gitignore's re-include; use `respectGitignore=false` or a positive allowlist pattern instead)
40
+ - NOT supported: `#` comments (each value is a single pattern, not a gitignore rule)
41
+ - NOT supported: trailing `/` directory suffix (write `dir/**` explicitly)
42
+ - Unlike `ignore`, `pattern` is NOT normalized: `*.ts` matches top-level files only, `**/*.ts` matches at any depth
@@ -0,0 +1,42 @@
1
+ - Fast content search tool that works with any codebase size
2
+ - Searches file CONTENTS using regular expressions
3
+ - Supports full regex syntax (eg. "log.*Error", "function\s+\w+", etc.)
4
+ - Filter which files to search with the include parameter (eg. "*.js", "*.{ts,tsx}")
5
+ - Returns file paths and line numbers with at least one match sorted by modification time
6
+ - Use this tool when you need to find files containing specific patterns
7
+ - If you need to identify/count the number of matches within files, use the Bash tool with `rg` (ripgrep) directly. Do NOT use `grep`.
8
+ - When you are doing an open-ended search that may require multiple rounds of globbing and grepping, use the Task tool instead
9
+ - You have the capability to call multiple tool calls in a single response. It is always better to speculatively perform multiple searches as a batch that are potentially useful.
10
+
11
+ path (default current project directory):
12
+ - The directory to search in; relative paths resolve against the current project directory
13
+ - An absolute path is used as-is; if it resolves OUTSIDE the project directory, an explicit permission request is raised before searching
14
+ - Searches recursively
15
+ - **`.gitignore` lookup follows the search directory, NOT the workspace root**: ripgrep starts from `path` and walks UPWARD, merging `.gitignore` files at every level (`path/.gitignore`, then `path/../.gitignore`, …, up to the nearest enclosing `.git` boundary or root). This means searching `path='packages/agent/src'` honors `packages/agent/src/.gitignore` first, then merges with its ancestors — which can DIFFER from a workspace-root search if a sub-tree has stricter ignore rules. If you want the same rules as a workspace-root search, pass `path='.'` (or omit it).
16
+ - **Dot-directories (e.g. `.easbot/`, `.git/`) are searched by default** unless excluded by an applicable `.gitignore` rule or by `include: '!.<dir>/**'`. To explicitly skip them, pass a glob like `include: '!.easbot/**'` or `include: '!.git/**'`.
17
+
18
+ include (default undefined = all files):
19
+ - Which files to search, as ONE glob pattern (string). Omit it to search every file
20
+ - Gitignore-style semantics, matching ripgrep's `--glob`. The rule that decides scope is whether the pattern contains a `/`:
21
+ - **No `/`** — matched against the file NAME at every depth: `*.ts` finds `top.ts` AND `src/deep/foo.ts`
22
+ - **Has `/`** — anchored to the search root: `src/*.ts` finds only `src/foo.ts`, never `other/src/foo.ts`
23
+ - `**` spans any number of directories: `src/**/*.ts` reaches every depth under src
24
+ - Brace expansion is supported: `*.{ts,tsx}` matches `.ts` and `.tsx`
25
+ - `?` matches a single character; `[a-z]` / `[!a-z]` character classes
26
+ - A leading `!` makes the pattern EXCLUSIVE. `include` takes ONE pattern, so a leading `!` means "search everything EXCEPT these files" (`!*.min.js`). To keep only a subset, pass that subset's pattern instead.
27
+ - Examples:
28
+ - `*.ts` — every TypeScript file, at any depth
29
+ - `src/*.ts` — only .ts files directly under src
30
+ - `src/**/*.ts` — .ts files anywhere under src
31
+ - `**/*.{test,spec}.ts` — every test file, at any depth
32
+ - `!*.min.js` — every file except minified ones
33
+ - `!node_modules/**` — every file except those under node_modules
34
+
35
+ Output notes:
36
+ - Grouped by file path, each match shown as ` Line <n>: <text>`
37
+ - Individual lines longer than 2000 characters are truncated with a trailing "..."
38
+ - At most 100 matches are returned; the output ends with a truncation notice
39
+ - Files are ordered by modification time, newest first
40
+
41
+ Example:
42
+ - pattern: "TODO|FIXME", include: "*.{ts,tsx}"
@@ -0,0 +1,14 @@
1
+ Read a file or directory from the local filesystem. If the path does not exist, an error is returned.
2
+
3
+ Usage:
4
+ - The filePath parameter should be an absolute path.
5
+ - By default, this tool returns up to 2000 lines from the start of the file.
6
+ - The offset parameter is the line number to start from (1-indexed).
7
+ - To read later sections, call this tool again with a larger offset.
8
+ - Use the grep tool to find specific content in large files or files with long lines.
9
+ - If you are unsure of the correct file path, use the glob tool to look up filenames by glob pattern.
10
+ - Contents are returned with each line prefixed by its line number as `<line>: <content>`. For example, if a file has contents "foo\n", you will receive "1: foo\n". For directories, entries are returned one per line (without line numbers) with a trailing `/` for subdirectories.
11
+ - Any line longer than 2000 characters is truncated.
12
+ - Call this tool in parallel when you know there are multiple files you want to read.
13
+ - Avoid tiny repeated slices (30 line chunks). If you need more context, read a larger window.
14
+ - This tool can read image files and PDFs and return them as file attachments.
@@ -0,0 +1,117 @@
1
+ Use this tool to create and manage a structured task list for your current coding session. This helps you track progress, organize complex tasks, and demonstrate thoroughness to the user.
2
+
3
+ ## Operations
4
+
5
+ This tool supports two operations:
6
+
7
+ ### 1. write - Write/Update TODO list
8
+ Use this operation to create, update, or replace the entire TODO list.
9
+
10
+ **Parameters:**
11
+ - `operation`: "write" (required)
12
+ - `todos`: Complete TODO list with all task items (required). Array of todo objects.
13
+
14
+ **When to Use:**
15
+ - Complex multistep tasks - When a task requires 3 or more distinct steps or actions
16
+ - Non-trivial and complex tasks - Tasks that require careful planning or multiple operations
17
+ - User explicitly requests todo list - When the user directly asks you to use the todo list
18
+ - User provides multiple tasks - When users provide a list of things to be done (numbered or comma-separated)
19
+ - After receiving new instructions - Immediately capture user requirements as todos
20
+ - After completing a task - Mark it complete and add any new follow-up tasks
21
+ - When starting a new task - Mark it as in_progress
22
+
23
+ ### 2. read - Read TODO list
24
+ Use this operation to read the current TODO list for the session.
25
+
26
+ **Parameters:**
27
+ - `operation`: "read" (required)
28
+
29
+ **When to Use:**
30
+ - At the beginning of conversations to see what's pending
31
+ - Before starting new tasks to prioritize work
32
+ - When the user asks about previous tasks or plans
33
+ - Whenever you're uncertain about what to do next
34
+ - After completing tasks to update your understanding of remaining work
35
+ - After every few messages to ensure you're on track
36
+
37
+ ## When NOT to Use This Tool
38
+
39
+ Skip using this tool when:
40
+ 1. There is only a single, straightforward task
41
+ 2. The task is trivial and tracking it provides no organizational benefit
42
+ 3. The task can be completed in less than 3 trivial steps
43
+ 4. The task is purely conversational or informational
44
+
45
+ NOTE: You should not use this tool if there is only one trivial task to do. In this case you are better off just doing the task directly.
46
+
47
+ ## Examples
48
+
49
+ ### Example 1: write operation
50
+ ```
51
+ User: I want to add a dark mode toggle to the application settings. Make sure you run the tests and build when you're done!
52
+ Assistant: I'll help add a dark mode toggle to your application settings. Let me create a todo list to track this implementation.
53
+ *Calls todo tool with operation="write" and todos=[
54
+ { id: "1", content: "Create dark mode toggle component in Settings page", status: "in_progress", priority: "high" },
55
+ { id: "2", content: "Add dark mode state management (context/store)", status: "pending", priority: "high" },
56
+ { id: "3", content: "Implement CSS-in-JS styles for dark theme", status: "pending", priority: "medium" },
57
+ { id: "4", content: "Update existing components to support theme switching", status: "pending", priority: "medium" },
58
+ { id: "5", content: "Run tests and build process", status: "pending", priority: "high" }
59
+ ]*
60
+ Begins working on the first task
61
+ ```
62
+
63
+ ### Example 2: read operation
64
+ ```
65
+ User: What tasks do I have pending?
66
+ Assistant: Let me check your TODO list.
67
+ *Calls todo tool with operation="read"*
68
+ Based on your TODO list, you have the following tasks pending:
69
+ 1. Create dark mode toggle component in Settings page (in_progress)
70
+ 2. Add dark mode state management (pending)
71
+ 3. Implement CSS-in-JS styles for dark theme (pending)
72
+ ...
73
+ ```
74
+
75
+ ### Example 3: write operation
76
+ ```
77
+ User: Help me rename the function getCwd to getCurrentWorkingDirectory across my project
78
+ Assistant: Let me first search through your codebase to find all occurrences of 'getCwd'.
79
+ *Uses grep or search tools to locate all instances of getCwd in the project*
80
+ Assistant: I've found 15 instances across 8 different files. Let me create a todo list to track these changes.
81
+ *Calls todo tool with operation="write" and todos=[
82
+ { id: "1", content: "Rename getCwd to getCurrentWorkingDirectory in src/utils.ts", status: "in_progress", priority: "high" },
83
+ { id: "2", content: "Rename getCwd to getCurrentWorkingDirectory in src/cli.ts", status: "pending", priority: "high" },
84
+ ...
85
+ ]*
86
+ Begins working on the first task
87
+ ```
88
+
89
+ ## Task States and Management
90
+
91
+ **Task States:**
92
+ - `pending`: Task not yet started
93
+ - `in_progress`: Currently working on (limit to ONE task at a time)
94
+ - `completed`: Task finished successfully
95
+ - `cancelled`: Task no longer needed
96
+
97
+ **Task Management:**
98
+ - Update task status in real-time as you work
99
+ - Mark tasks complete IMMEDIATELY after finishing (don't batch completions)
100
+ - Only have ONE task in_progress at any time
101
+ - Complete current tasks before starting new ones
102
+ - Cancel tasks that become irrelevant
103
+
104
+ **Task Breakdown:**
105
+ - Create specific, actionable items
106
+ - Break complex tasks into smaller, manageable steps
107
+ - Use clear, descriptive task names
108
+
109
+ ## Task Item Structure
110
+
111
+ Each task item should have:
112
+ - `id`: Unique identifier (string or number)
113
+ - `content`: Description of the task (string)
114
+ - `status`: Current state ("pending", "in_progress", "completed", "cancelled")
115
+ - `priority`: Priority level (optional, "high", "medium", "low")
116
+
117
+ When in doubt, use this tool. Being proactive with task management demonstrates attentiveness and ensures you complete all requirements successfully.
@@ -0,0 +1,13 @@
1
+ - Fetches content from a specified URL
2
+ - Takes a URL and optional format as input
3
+ - Fetches the URL content, converts to requested format (markdown by default)
4
+ - Returns the content in the specified format
5
+ - Use this tool when you need to retrieve and analyze web content
6
+
7
+ Usage notes:
8
+ - IMPORTANT: if another tool is present that offers better web fetching capabilities, is more targeted to the task, or has fewer restrictions, prefer using that tool instead of this one.
9
+ - The URL must be a fully-formed valid URL
10
+ - HTTP URLs will be automatically upgraded to HTTPS
11
+ - Format options: "markdown" (default), "text", or "html"
12
+ - This tool is read-only and does not modify any files
13
+ - Results may be summarized if the content is very large