@iinm/plain-agent 1.0.0
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/.config/agents.library/code-simplifier.md +5 -0
- package/.config/agents.library/qa-engineer.md +74 -0
- package/.config/agents.library/software-architect.md +278 -0
- package/.config/agents.predefined/worker.md +3 -0
- package/.config/config.predefined.json +825 -0
- package/.config/prompts.library/code-review.md +8 -0
- package/.config/prompts.library/feature-dev.md +6 -0
- package/.config/prompts.predefined/shortcuts/commit-by-user.md +9 -0
- package/.config/prompts.predefined/shortcuts/commit.md +10 -0
- package/.config/prompts.predefined/shortcuts/general-question.md +6 -0
- package/LICENSE +21 -0
- package/README.md +624 -0
- package/bin/plain +3 -0
- package/bin/plain-interrupt +6 -0
- package/bin/plain-notify-desktop +19 -0
- package/bin/plain-notify-terminal-bell +3 -0
- package/package.json +57 -0
- package/sandbox/bin/plain-sandbox +972 -0
- package/src/agent.d.ts +48 -0
- package/src/agent.mjs +159 -0
- package/src/agentLoop.mjs +369 -0
- package/src/agentState.mjs +41 -0
- package/src/cliArgs.mjs +45 -0
- package/src/cliFormatter.mjs +217 -0
- package/src/cliInteractive.mjs +739 -0
- package/src/config.d.ts +48 -0
- package/src/config.mjs +168 -0
- package/src/context/consumeInterruptMessage.mjs +30 -0
- package/src/context/loadAgentRoles.mjs +272 -0
- package/src/context/loadPrompts.mjs +312 -0
- package/src/context/loadUserMessageContext.mjs +147 -0
- package/src/env.mjs +46 -0
- package/src/main.mjs +202 -0
- package/src/mcp.mjs +202 -0
- package/src/model.d.ts +109 -0
- package/src/modelCaller.mjs +29 -0
- package/src/modelDefinition.d.ts +73 -0
- package/src/prompt.mjs +128 -0
- package/src/providers/anthropic.d.ts +248 -0
- package/src/providers/anthropic.mjs +596 -0
- package/src/providers/gemini.d.ts +208 -0
- package/src/providers/gemini.mjs +752 -0
- package/src/providers/openai.d.ts +281 -0
- package/src/providers/openai.mjs +551 -0
- package/src/providers/openaiCompatible.d.ts +147 -0
- package/src/providers/openaiCompatible.mjs +658 -0
- package/src/providers/platform/azure.mjs +42 -0
- package/src/providers/platform/bedrock.mjs +74 -0
- package/src/providers/platform/googleCloud.mjs +34 -0
- package/src/subagent.mjs +247 -0
- package/src/tmpfile.mjs +27 -0
- package/src/tool.d.ts +74 -0
- package/src/toolExecutor.mjs +236 -0
- package/src/toolInputValidator.mjs +183 -0
- package/src/toolUseApprover.mjs +98 -0
- package/src/tools/askGoogle.mjs +135 -0
- package/src/tools/delegateToSubagent.d.ts +4 -0
- package/src/tools/delegateToSubagent.mjs +48 -0
- package/src/tools/execCommand.d.ts +22 -0
- package/src/tools/execCommand.mjs +200 -0
- package/src/tools/fetchWebPage.mjs +96 -0
- package/src/tools/patchFile.d.ts +4 -0
- package/src/tools/patchFile.mjs +96 -0
- package/src/tools/reportAsSubagent.d.ts +3 -0
- package/src/tools/reportAsSubagent.mjs +44 -0
- package/src/tools/tavilySearch.d.ts +6 -0
- package/src/tools/tavilySearch.mjs +57 -0
- package/src/tools/tmuxCommand.d.ts +14 -0
- package/src/tools/tmuxCommand.mjs +194 -0
- package/src/tools/writeFile.d.ts +4 -0
- package/src/tools/writeFile.mjs +56 -0
- package/src/utils/evalJSONConfig.mjs +48 -0
- package/src/utils/matchValue.d.ts +6 -0
- package/src/utils/matchValue.mjs +40 -0
- package/src/utils/noThrow.mjs +31 -0
- package/src/utils/notify.mjs +28 -0
- package/src/utils/parseFileRange.mjs +18 -0
- package/src/utils/readFileRange.mjs +33 -0
- package/src/utils/retryOnError.mjs +41 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
|
|
3
|
+
set -eu -o pipefail
|
|
4
|
+
|
|
5
|
+
title="$(basename "$(pwd)")"
|
|
6
|
+
content="Agent is waiting for you 👋"
|
|
7
|
+
|
|
8
|
+
if command -v osascript > /dev/null 2>&1; then
|
|
9
|
+
# macOS - use osascript
|
|
10
|
+
escaped_title=$(printf '%s' "$title" | sed -e 's,",\\\\",g')
|
|
11
|
+
escaped_content=$(printf '%s' "$content" | sed -e 's,",\\\\",g')
|
|
12
|
+
osascript -e "display notification \"$escaped_content\" with title \"$escaped_title\""
|
|
13
|
+
elif command -v notify-send > /dev/null 2>&1; then
|
|
14
|
+
# Linux - use notify-send
|
|
15
|
+
notify-send "$title" "$content"
|
|
16
|
+
else
|
|
17
|
+
# Fallback - Terminal bell
|
|
18
|
+
printf "\a"
|
|
19
|
+
fi
|
package/package.json
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@iinm/plain-agent",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "A lightweight CLI-based coding agent",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/iinm/plain-agent.git"
|
|
10
|
+
},
|
|
11
|
+
"bin": {
|
|
12
|
+
"plain": "./bin/plain",
|
|
13
|
+
"plain-interrupt": "./bin/plain-interrupt",
|
|
14
|
+
"plain-notify-desktop": "./bin/plain-notify-desktop",
|
|
15
|
+
"plain-notify-terminal-bell": "./bin/plain-notify-terminal-bell",
|
|
16
|
+
"plain-sandbox": "./sandbox/bin/plain-sandbox"
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"bin",
|
|
20
|
+
"sandbox/bin",
|
|
21
|
+
".config",
|
|
22
|
+
"src/**/*.mjs",
|
|
23
|
+
"src/**/*.d.ts",
|
|
24
|
+
"!src/**/*.test.mjs",
|
|
25
|
+
"!src/**/*.playground.mjs",
|
|
26
|
+
"!src/utils/test/"
|
|
27
|
+
],
|
|
28
|
+
"engines": {
|
|
29
|
+
"node": ">=22"
|
|
30
|
+
},
|
|
31
|
+
"scripts": {
|
|
32
|
+
"check": "npm run lint && tsc && npm run test",
|
|
33
|
+
"test": "node --test",
|
|
34
|
+
"lint": "npx @biomejs/biome check",
|
|
35
|
+
"fix": "npx @biomejs/biome check --fix"
|
|
36
|
+
},
|
|
37
|
+
"dependencies": {
|
|
38
|
+
"@aws-crypto/sha256-js": "^5.2.0",
|
|
39
|
+
"@aws-sdk/credential-providers": "^3.1001.0",
|
|
40
|
+
"@modelcontextprotocol/sdk": "^1.27.1",
|
|
41
|
+
"@mozilla/readability": "^0.6.0",
|
|
42
|
+
"@smithy/protocol-http": "^5.3.10",
|
|
43
|
+
"@smithy/signature-v4": "^5.3.10",
|
|
44
|
+
"diff": "^8.0.3",
|
|
45
|
+
"js-yaml": "^4.1.1",
|
|
46
|
+
"jsdom": "^28.1.0",
|
|
47
|
+
"turndown": "^7.2.2"
|
|
48
|
+
},
|
|
49
|
+
"devDependencies": {
|
|
50
|
+
"@biomejs/biome": "^2.4.5",
|
|
51
|
+
"@types/js-yaml": "^4.0.9",
|
|
52
|
+
"@types/jsdom": "^28.0.0",
|
|
53
|
+
"@types/node": "^22.19.13",
|
|
54
|
+
"@types/turndown": "^5.0.6",
|
|
55
|
+
"typescript": "^5.9.3"
|
|
56
|
+
}
|
|
57
|
+
}
|