@iinm/plain-agent 1.10.22 → 1.10.23
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.
- package/package.json +1 -1
- package/src/prompt.mjs +10 -23
- package/src/tools/execCommand.mjs +10 -4
package/package.json
CHANGED
package/src/prompt.mjs
CHANGED
|
@@ -49,38 +49,25 @@ Respond in the user's language.
|
|
|
49
49
|
|
|
50
50
|
# Memory Files
|
|
51
51
|
|
|
52
|
-
Memory files preserve
|
|
52
|
+
Memory files preserve state to resume work after context resets.
|
|
53
53
|
|
|
54
|
-
- Create/Update memory files when creating/updating a plan, completing milestones, encountering issues, or making decisions.
|
|
55
|
-
-
|
|
54
|
+
- Create/Update memory files when creating/updating a plan, completing milestones, encountering issues, or making decisions.
|
|
55
|
+
- Skip memory files for tasks that can be completed in a few steps.
|
|
56
56
|
- Write the memory content in the user's language.
|
|
57
57
|
|
|
58
58
|
Memory files should include:
|
|
59
59
|
- Task overview: What the task is, why it's being done, requirements and constraints
|
|
60
|
-
- References: AGENTS.md,
|
|
61
|
-
- Progress tracking: Completed milestones with
|
|
62
|
-
- Decision records: Key decisions, alternatives considered, and
|
|
60
|
+
- References: AGENTS.md, documentation, source files, commands
|
|
61
|
+
- Progress tracking: Completed milestones with results, current status, and next steps
|
|
62
|
+
- Decision records: Key decisions, alternatives considered, and reason
|
|
63
63
|
|
|
64
64
|
# Tools
|
|
65
65
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
## patch_file
|
|
69
|
-
|
|
70
|
-
Always read the target lines with \`read_file\` first to verify line numbers and their 2-char hashes before calling \`patch_file\`.
|
|
71
|
-
|
|
72
|
-
## exec_command
|
|
73
|
-
|
|
66
|
+
- Run independent tools in parallel.
|
|
67
|
+
- Verify line numbers and hashes with read_file before calling patch_file.
|
|
74
68
|
- Use relative paths for files inside the working directory, absolute paths for files outside.
|
|
75
69
|
- Use ${projectMetadataDir}/tmp/ for temporary files.
|
|
76
70
|
|
|
77
|
-
Examples:
|
|
78
|
-
- List directories or find files: fd [".", "./", "--max-depth", "3", "--type", "d", "--hidden"]
|
|
79
|
-
- Search for strings: rg ["--heading", "--line-number", "pattern", "./"]
|
|
80
|
-
- Manage GitHub issues and PRs:
|
|
81
|
-
Get PR details: gh ["pr", "view", "123", "--json", "title,body,url"]
|
|
82
|
-
Get PR comment: gh ["api", "--method", "GET", "repos/<owner>/<repo>/pulls/comments/<id>", "--jq", "{user: .user.login, path: .path, line: .line, body: .body}"]
|
|
83
|
-
|
|
84
71
|
# Project Rules and Skills
|
|
85
72
|
|
|
86
73
|
Discover and apply project-specific rules and reusable skills.
|
|
@@ -99,12 +86,12 @@ ${skillDescriptions}
|
|
|
99
86
|
|
|
100
87
|
# Environment
|
|
101
88
|
|
|
89
|
+
- Session id: ${sessionId}
|
|
90
|
+
- Memory file path: ${projectMetadataDir}/memory/${sessionId}--<kebab-case-title>.md
|
|
102
91
|
- User name: ${username}
|
|
103
92
|
- Your model name: ${modelName}
|
|
104
93
|
- Current working directory: ${workingDir}
|
|
105
94
|
- Today's date: ${today}
|
|
106
|
-
- Session id: ${sessionId}
|
|
107
|
-
- Memory file path: ${projectMetadataDir}/memory/${sessionId}--<kebab-case-title>.md
|
|
108
95
|
|
|
109
96
|
Available subagents:
|
|
110
97
|
${agentRoleDescriptions}
|
|
@@ -20,7 +20,15 @@ export function createExecCommandTool(config) {
|
|
|
20
20
|
return {
|
|
21
21
|
def: {
|
|
22
22
|
name: "exec_command",
|
|
23
|
-
description:
|
|
23
|
+
description: `Run a command without shell interpretation.
|
|
24
|
+
|
|
25
|
+
Examples:
|
|
26
|
+
- List directories or find files: fd [".", "./", "--max-depth", "3", "--type", "d", "--hidden"]
|
|
27
|
+
- Search for strings: rg ["--heading", "--line-number", "pattern", "./"]
|
|
28
|
+
- Manage GitHub issues and PRs:
|
|
29
|
+
Get PR details: gh ["pr", "view", "123", "--json", "title,body,url"]
|
|
30
|
+
Get PR comment: gh ["api", "--method", "GET", "repos/<owner>/<repo>/pulls/comments/<id>", "--jq", "{user: .user.login, path: .path, line: .line, body: .body}"]
|
|
31
|
+
`.trim(),
|
|
24
32
|
inputSchema: {
|
|
25
33
|
type: "object",
|
|
26
34
|
properties: {
|
|
@@ -29,9 +37,7 @@ export function createExecCommandTool(config) {
|
|
|
29
37
|
type: "string",
|
|
30
38
|
},
|
|
31
39
|
args: {
|
|
32
|
-
|
|
33
|
-
description:
|
|
34
|
-
"Array of arguments to pass to the command. Do not include the command name itself in this array.",
|
|
40
|
+
description: "Array of arguments to pass to the command.",
|
|
35
41
|
type: "array",
|
|
36
42
|
items: {
|
|
37
43
|
type: "string",
|