@iinm/plain-agent 1.7.23 → 1.7.25
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/README.md
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
A lightweight CLI-based coding agent.
|
|
4
4
|
|
|
5
5
|
- **Multi-provider** — Use Claude, GPT, Gemini, or any OpenAI-compatible model.
|
|
6
|
+
- **Compact system prompt** — Under 3.5 KB, keeping per-request overhead and cost low ([src/prompt.mjs](https://github.com/iinm/plain-agent/blob/main/src/prompt.mjs)).
|
|
6
7
|
- **Fine-grained approval rules** — Auto-approve commands by name, arguments,
|
|
7
8
|
and file paths using regex patterns
|
|
8
9
|
([`config.predefined.json#autoApproval`](https://github.com/iinm/plain-agent/blob/main/config/config.predefined.json)).
|
|
@@ -142,6 +143,12 @@ Create the configuration.
|
|
|
142
143
|
"variant": "fireworks",
|
|
143
144
|
"baseURL": "https://api.fireworks.ai/inference",
|
|
144
145
|
"apiKey": "<FIREWORKS_API_KEY>"
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"name": "openai-compatible",
|
|
149
|
+
"variant": "novita",
|
|
150
|
+
"baseURL": "https://api.novita.ai/openai",
|
|
151
|
+
"apiKey": "<NOVITA_API_KEY>"
|
|
145
152
|
}
|
|
146
153
|
]
|
|
147
154
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
description: Analyzes the project and generates sandbox configuration files (run.sh, setup.sh) tailored to the project's needs.
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
-
You are a sandbox
|
|
5
|
+
You are a sandbox configurator. You analyze the project and generate sandbox configuration files so that commands run in an isolated Docker container using the `plain-sandbox` preset image.
|
|
6
6
|
|
|
7
7
|
## Overview
|
|
8
8
|
|
|
@@ -11,8 +11,6 @@ You create the following files:
|
|
|
11
11
|
- `.plain-agent/sandbox/run.sh` — Wrapper script for `plain-sandbox` with project-specific options
|
|
12
12
|
- `.plain-agent/setup.sh` — Initial setup script for both sandbox and host
|
|
13
13
|
|
|
14
|
-
You also show an example `sandbox` config for `.plain-agent/config.json`, but you **never modify** config.json directly.
|
|
15
|
-
|
|
16
14
|
## Step 1: Analyze the Project
|
|
17
15
|
|
|
18
16
|
Before generating anything, analyze the project to determine:
|
|
@@ -956,6 +956,29 @@
|
|
|
956
956
|
}
|
|
957
957
|
}
|
|
958
958
|
},
|
|
959
|
+
{
|
|
960
|
+
"name": "glm-5.1",
|
|
961
|
+
"variant": "novita",
|
|
962
|
+
"platform": {
|
|
963
|
+
"name": "openai-compatible",
|
|
964
|
+
"variant": "novita"
|
|
965
|
+
},
|
|
966
|
+
"model": {
|
|
967
|
+
"format": "openai-messages",
|
|
968
|
+
"config": {
|
|
969
|
+
"model": "zai-org/glm-5.1"
|
|
970
|
+
}
|
|
971
|
+
},
|
|
972
|
+
"cost": {
|
|
973
|
+
"currency": "USD",
|
|
974
|
+
"unit": "1M",
|
|
975
|
+
"costs": {
|
|
976
|
+
"prompt_tokens": 1.4,
|
|
977
|
+
"prompt_tokens_details.cached_tokens": -1.14,
|
|
978
|
+
"completion_tokens": 4.4
|
|
979
|
+
}
|
|
980
|
+
}
|
|
981
|
+
},
|
|
959
982
|
|
|
960
983
|
{
|
|
961
984
|
"name": "kimi-k2.6",
|
|
@@ -980,24 +1003,55 @@
|
|
|
980
1003
|
}
|
|
981
1004
|
}
|
|
982
1005
|
},
|
|
1006
|
+
{
|
|
1007
|
+
"name": "kimi-k2.6",
|
|
1008
|
+
"variant": "novita",
|
|
1009
|
+
"platform": {
|
|
1010
|
+
"name": "openai-compatible",
|
|
1011
|
+
"variant": "novita"
|
|
1012
|
+
},
|
|
1013
|
+
"model": {
|
|
1014
|
+
"format": "openai-messages",
|
|
1015
|
+
"config": {
|
|
1016
|
+
"model": "moonshotai/kimi-k2.6"
|
|
1017
|
+
}
|
|
1018
|
+
},
|
|
1019
|
+
"cost": {
|
|
1020
|
+
"currency": "USD",
|
|
1021
|
+
"unit": "1M",
|
|
1022
|
+
"costs": {
|
|
1023
|
+
"prompt_tokens": 0.95,
|
|
1024
|
+
"prompt_tokens_details.cached_tokens": -0.79,
|
|
1025
|
+
"completion_tokens": 4
|
|
1026
|
+
}
|
|
1027
|
+
}
|
|
1028
|
+
},
|
|
983
1029
|
|
|
984
1030
|
{
|
|
985
|
-
"name": "deepseek-
|
|
986
|
-
"variant": "
|
|
1031
|
+
"name": "deepseek-v4-pro",
|
|
1032
|
+
"variant": "novita",
|
|
987
1033
|
"platform": {
|
|
988
|
-
"name": "
|
|
989
|
-
"variant": "
|
|
1034
|
+
"name": "openai-compatible",
|
|
1035
|
+
"variant": "novita"
|
|
990
1036
|
},
|
|
991
1037
|
"model": {
|
|
992
1038
|
"format": "openai-messages",
|
|
993
1039
|
"config": {
|
|
994
|
-
"model": "deepseek
|
|
995
|
-
|
|
1040
|
+
"model": "deepseek/deepseek-v4-pro"
|
|
1041
|
+
}
|
|
1042
|
+
},
|
|
1043
|
+
"cost": {
|
|
1044
|
+
"currency": "USD",
|
|
1045
|
+
"unit": "1M",
|
|
1046
|
+
"costs": {
|
|
1047
|
+
"prompt_tokens": 1.74,
|
|
1048
|
+
"prompt_tokens_details.cached_tokens": -1.595,
|
|
1049
|
+
"completion_tokens": 3.48
|
|
996
1050
|
}
|
|
997
1051
|
}
|
|
998
1052
|
},
|
|
999
1053
|
{
|
|
1000
|
-
"name": "deepseek-
|
|
1054
|
+
"name": "deepseek-v4-pro",
|
|
1001
1055
|
"variant": "fireworks",
|
|
1002
1056
|
"platform": {
|
|
1003
1057
|
"name": "openai-compatible",
|
|
@@ -1006,16 +1060,16 @@
|
|
|
1006
1060
|
"model": {
|
|
1007
1061
|
"format": "openai-messages",
|
|
1008
1062
|
"config": {
|
|
1009
|
-
"model": "accounts/fireworks/models/deepseek-
|
|
1063
|
+
"model": "accounts/fireworks/models/deepseek-v4-pro"
|
|
1010
1064
|
}
|
|
1011
1065
|
},
|
|
1012
1066
|
"cost": {
|
|
1013
1067
|
"currency": "USD",
|
|
1014
1068
|
"unit": "1M",
|
|
1015
1069
|
"costs": {
|
|
1016
|
-
"prompt_tokens":
|
|
1017
|
-
"prompt_tokens_details.cached_tokens": -
|
|
1018
|
-
"completion_tokens":
|
|
1070
|
+
"prompt_tokens": 1.74,
|
|
1071
|
+
"prompt_tokens_details.cached_tokens": -1.6,
|
|
1072
|
+
"completion_tokens": 3.48
|
|
1019
1073
|
}
|
|
1020
1074
|
}
|
|
1021
1075
|
},
|
|
@@ -1038,26 +1092,35 @@
|
|
|
1038
1092
|
"unit": "1M",
|
|
1039
1093
|
"costs": {
|
|
1040
1094
|
"prompt_tokens": 0.3,
|
|
1041
|
-
"prompt_tokens_details.cached_tokens": -0.
|
|
1095
|
+
"prompt_tokens_details.cached_tokens": -0.24,
|
|
1042
1096
|
"completion_tokens": 1.2
|
|
1043
1097
|
}
|
|
1044
1098
|
}
|
|
1045
1099
|
},
|
|
1046
|
-
|
|
1047
1100
|
{
|
|
1048
|
-
"name": "
|
|
1049
|
-
"variant": "
|
|
1101
|
+
"name": "minimax-m2.7",
|
|
1102
|
+
"variant": "novita",
|
|
1050
1103
|
"platform": {
|
|
1051
|
-
"name": "
|
|
1052
|
-
"variant": "
|
|
1104
|
+
"name": "openai-compatible",
|
|
1105
|
+
"variant": "novita"
|
|
1053
1106
|
},
|
|
1054
1107
|
"model": {
|
|
1055
1108
|
"format": "openai-messages",
|
|
1056
1109
|
"config": {
|
|
1057
|
-
"model": "
|
|
1110
|
+
"model": "minimax/minimax-m2.7"
|
|
1111
|
+
}
|
|
1112
|
+
},
|
|
1113
|
+
"cost": {
|
|
1114
|
+
"currency": "USD",
|
|
1115
|
+
"unit": "1M",
|
|
1116
|
+
"costs": {
|
|
1117
|
+
"prompt_tokens": 0.3,
|
|
1118
|
+
"prompt_tokens_details.cached_tokens": -0.24,
|
|
1119
|
+
"completion_tokens": 1.2
|
|
1058
1120
|
}
|
|
1059
1121
|
}
|
|
1060
1122
|
},
|
|
1123
|
+
|
|
1061
1124
|
{
|
|
1062
1125
|
"name": "qwen3.6-plus",
|
|
1063
1126
|
"variant": "fireworks",
|
|
@@ -1081,6 +1144,28 @@
|
|
|
1081
1144
|
}
|
|
1082
1145
|
}
|
|
1083
1146
|
},
|
|
1147
|
+
{
|
|
1148
|
+
"name": "qwen3.6-27b",
|
|
1149
|
+
"variant": "novita",
|
|
1150
|
+
"platform": {
|
|
1151
|
+
"name": "openai-compatible",
|
|
1152
|
+
"variant": "novita"
|
|
1153
|
+
},
|
|
1154
|
+
"model": {
|
|
1155
|
+
"format": "openai-messages",
|
|
1156
|
+
"config": {
|
|
1157
|
+
"model": "qwen/qwen3.6-27b"
|
|
1158
|
+
}
|
|
1159
|
+
},
|
|
1160
|
+
"cost": {
|
|
1161
|
+
"currency": "USD",
|
|
1162
|
+
"unit": "1M",
|
|
1163
|
+
"costs": {
|
|
1164
|
+
"prompt_tokens": 0.6,
|
|
1165
|
+
"completion_tokens": 3.6
|
|
1166
|
+
}
|
|
1167
|
+
}
|
|
1168
|
+
},
|
|
1084
1169
|
|
|
1085
1170
|
{
|
|
1086
1171
|
"name": "nova-2-lite",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@iinm/plain-agent",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.25",
|
|
4
4
|
"description": "A lightweight CLI-based coding agent",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -46,6 +46,6 @@
|
|
|
46
46
|
"@biomejs/biome": "^2.4.12",
|
|
47
47
|
"@types/js-yaml": "^4.0.9",
|
|
48
48
|
"@types/node": "^22.19.17",
|
|
49
|
-
"typescript": "^
|
|
49
|
+
"typescript": "^6.0.2"
|
|
50
50
|
}
|
|
51
51
|
}
|
package/src/agent.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import type { EventEmitter } from "node:events";
|
|
2
|
+
import type { AgentRole } from "./context/loadAgentRoles.mjs";
|
|
3
|
+
import type { CostConfig, CostSummary } from "./costTracker.mjs";
|
|
2
4
|
import type {
|
|
3
5
|
CallModel,
|
|
4
6
|
Message,
|
|
@@ -8,8 +10,6 @@ import type {
|
|
|
8
10
|
ProviderTokenUsage,
|
|
9
11
|
} from "./model";
|
|
10
12
|
import type { Tool, ToolUseApprover } from "./tool";
|
|
11
|
-
import type { AgentRole } from "./context/loadAgentRoles.mjs";
|
|
12
|
-
import type { CostSummary, CostConfig } from "./costTracker.mjs";
|
|
13
13
|
|
|
14
14
|
export type Agent = {
|
|
15
15
|
userEventEmitter: UserEventEmitter;
|
package/src/config.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { ClaudeCodePluginRepo } from "./claudeCodePlugin.mjs";
|
|
1
2
|
import { ModelDefinition, PlatformConfig } from "./modelDefinition";
|
|
2
3
|
import { ToolUsePattern } from "./tool";
|
|
3
4
|
import { AskURLToolOptions } from "./tools/askURL.mjs";
|
|
4
5
|
import { AskWebToolOptions } from "./tools/askWeb.mjs";
|
|
5
6
|
import { ExecCommandSanboxConfig } from "./tools/execCommand";
|
|
6
|
-
import { ClaudeCodePluginRepo } from "./claudeCodePlugin.mjs";
|
|
7
7
|
import { VoiceInputConfig } from "./voiceInput.mjs";
|
|
8
8
|
|
|
9
9
|
export type AppConfig = {
|
package/src/modelDefinition.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { AnthropicModelConfig } from "./providers/anthropic";
|
|
2
|
+
import { BedrockConverseModelConfig } from "./providers/bedrock";
|
|
2
3
|
import { GeminiModelConfig } from "./providers/gemini";
|
|
3
4
|
import { OpenAIModelConfig } from "./providers/openai";
|
|
4
5
|
import { OpenAICompatibleModelConfig } from "./providers/openaiCompatible";
|
|
5
|
-
import { BedrockConverseModelConfig } from "./providers/bedrock";
|
|
6
6
|
|
|
7
7
|
export type ModelDefinition = {
|
|
8
8
|
name: string;
|