@iinm/plain-agent 1.11.1 → 1.11.3
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 +2 -2
- package/config/config.predefined.json +110 -0
- package/package.json +1 -1
- package/src/toolInputValidator.mjs +4 -5
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
[](https://deepwiki.com/iinm/plain-agent)
|
|
4
4
|
[](https://www.npmjs.com/package/@iinm/plain-agent)
|
|
5
5
|
[](https://packagephobia.com/result?p=@iinm/plain-agent)
|
|
6
|
-
[](https://socket.dev/npm/package/@iinm/plain-agent)
|
|
7
7
|
[](https://github.com/iinm/plain-agent/actions/workflows/github-code-scanning/codeql)
|
|
8
8
|
|
|
9
9
|
A lightweight terminal-based coding agent focused on safety and low token cost
|
|
@@ -175,7 +175,7 @@ Compound arguments are decomposed before validation — embedded paths are extra
|
|
|
175
175
|
| `--opt=<val>` | `--prefix=/tmp/foo` | `/tmp/foo` |
|
|
176
176
|
| `-X<val>` | `-I/usr/include` | `/usr/include` |
|
|
177
177
|
| `VAR=<val>` | `OUTPUT=/etc/passwd` | `/etc/passwd` |
|
|
178
|
-
| `proto://…` | `file:///etc/passwd` | `/etc/passwd` |
|
|
178
|
+
| `proto://…` | `file:///etc/passwd` | `/etc/passwd` (only `file:` is treated as a local path; `http(s)://` URLs are always allowed) |
|
|
179
179
|
|
|
180
180
|
`--opt=<val>`, `-X<val>`, and `VAR=<val>` are checked recursively, so chained patterns like `-DINSTALL_DIR=/etc` decompose fully (`-D` → `INSTALL_DIR=/etc` → `/etc`).
|
|
181
181
|
|
|
@@ -595,6 +595,62 @@
|
|
|
595
595
|
}
|
|
596
596
|
}
|
|
597
597
|
},
|
|
598
|
+
{
|
|
599
|
+
"name": "claude-fable-5",
|
|
600
|
+
"variant": "thinking-high",
|
|
601
|
+
"platform": {
|
|
602
|
+
"name": "anthropic",
|
|
603
|
+
"variant": "default",
|
|
604
|
+
"baseURL": "https://api.anthropic.com"
|
|
605
|
+
},
|
|
606
|
+
"model": {
|
|
607
|
+
"format": "anthropic",
|
|
608
|
+
"config": {
|
|
609
|
+
"model": "claude-fable-5",
|
|
610
|
+
"max_tokens": 32768,
|
|
611
|
+
"thinking": { "type": "adaptive" },
|
|
612
|
+
"output_config": { "effort": "high" }
|
|
613
|
+
}
|
|
614
|
+
},
|
|
615
|
+
"cost": {
|
|
616
|
+
"currency": "USD",
|
|
617
|
+
"unit": "1M",
|
|
618
|
+
"prices": {
|
|
619
|
+
"input_tokens": 10,
|
|
620
|
+
"output_tokens": 50,
|
|
621
|
+
"cache_read_input_tokens": 1,
|
|
622
|
+
"cache_creation_input_tokens": 12.50
|
|
623
|
+
}
|
|
624
|
+
}
|
|
625
|
+
},
|
|
626
|
+
{
|
|
627
|
+
"name": "claude-fable-5",
|
|
628
|
+
"variant": "thinking-max",
|
|
629
|
+
"platform": {
|
|
630
|
+
"name": "anthropic",
|
|
631
|
+
"variant": "default",
|
|
632
|
+
"baseURL": "https://api.anthropic.com"
|
|
633
|
+
},
|
|
634
|
+
"model": {
|
|
635
|
+
"format": "anthropic",
|
|
636
|
+
"config": {
|
|
637
|
+
"model": "claude-fable-5",
|
|
638
|
+
"max_tokens": 64000,
|
|
639
|
+
"thinking": { "type": "adaptive" },
|
|
640
|
+
"output_config": { "effort": "max" }
|
|
641
|
+
}
|
|
642
|
+
},
|
|
643
|
+
"cost": {
|
|
644
|
+
"currency": "USD",
|
|
645
|
+
"unit": "1M",
|
|
646
|
+
"prices": {
|
|
647
|
+
"input_tokens": 10,
|
|
648
|
+
"output_tokens": 50,
|
|
649
|
+
"cache_read_input_tokens": 1,
|
|
650
|
+
"cache_creation_input_tokens": 12.50
|
|
651
|
+
}
|
|
652
|
+
}
|
|
653
|
+
},
|
|
598
654
|
|
|
599
655
|
{
|
|
600
656
|
"name": "claude-haiku-4-5",
|
|
@@ -756,6 +812,60 @@
|
|
|
756
812
|
}
|
|
757
813
|
}
|
|
758
814
|
},
|
|
815
|
+
{
|
|
816
|
+
"name": "claude-fable-5",
|
|
817
|
+
"variant": "thinking-high-bedrock",
|
|
818
|
+
"platform": {
|
|
819
|
+
"name": "bedrock",
|
|
820
|
+
"variant": "default"
|
|
821
|
+
},
|
|
822
|
+
"model": {
|
|
823
|
+
"format": "anthropic",
|
|
824
|
+
"config": {
|
|
825
|
+
"model": "global.anthropic.claude-fable-5",
|
|
826
|
+
"max_tokens": 32768,
|
|
827
|
+
"thinking": { "type": "adaptive" },
|
|
828
|
+
"output_config": { "effort": "high" }
|
|
829
|
+
}
|
|
830
|
+
},
|
|
831
|
+
"cost": {
|
|
832
|
+
"currency": "USD",
|
|
833
|
+
"unit": "1M",
|
|
834
|
+
"prices": {
|
|
835
|
+
"input_tokens": 10,
|
|
836
|
+
"output_tokens": 50,
|
|
837
|
+
"cache_read_input_tokens": 1,
|
|
838
|
+
"cache_creation_input_tokens": 12.50
|
|
839
|
+
}
|
|
840
|
+
}
|
|
841
|
+
},
|
|
842
|
+
{
|
|
843
|
+
"name": "claude-fable-5",
|
|
844
|
+
"variant": "thinking-max-bedrock",
|
|
845
|
+
"platform": {
|
|
846
|
+
"name": "bedrock",
|
|
847
|
+
"variant": "default"
|
|
848
|
+
},
|
|
849
|
+
"model": {
|
|
850
|
+
"format": "anthropic",
|
|
851
|
+
"config": {
|
|
852
|
+
"model": "global.anthropic.claude-fable-5",
|
|
853
|
+
"max_tokens": 64000,
|
|
854
|
+
"thinking": { "type": "adaptive" },
|
|
855
|
+
"output_config": { "effort": "max" }
|
|
856
|
+
}
|
|
857
|
+
},
|
|
858
|
+
"cost": {
|
|
859
|
+
"currency": "USD",
|
|
860
|
+
"unit": "1M",
|
|
861
|
+
"prices": {
|
|
862
|
+
"input_tokens": 10,
|
|
863
|
+
"output_tokens": 50,
|
|
864
|
+
"cache_read_input_tokens": 1,
|
|
865
|
+
"cache_creation_input_tokens": 12.50
|
|
866
|
+
}
|
|
867
|
+
}
|
|
868
|
+
},
|
|
759
869
|
|
|
760
870
|
{
|
|
761
871
|
"name": "gemini-3.5-flash",
|
package/package.json
CHANGED
|
@@ -108,19 +108,18 @@ export function isSafeToolInputItem(
|
|
|
108
108
|
);
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
-
//
|
|
112
|
-
const
|
|
113
|
-
if (
|
|
111
|
+
// file:// pattern — references the local filesystem
|
|
112
|
+
const fileMatch = arg.match(/^file:\/\/(.+)$/i);
|
|
113
|
+
if (fileMatch) {
|
|
114
114
|
return (
|
|
115
115
|
isSafeToolInputItemRaw(arg, allowedPaths, allowGitUnmanagedFiles) &&
|
|
116
116
|
isSafeToolInputItemRaw(
|
|
117
|
-
`/${
|
|
117
|
+
`/${fileMatch[1]}`,
|
|
118
118
|
allowedPaths,
|
|
119
119
|
allowGitUnmanagedFiles,
|
|
120
120
|
)
|
|
121
121
|
);
|
|
122
122
|
}
|
|
123
|
-
|
|
124
123
|
return isSafeToolInputItemRaw(arg, allowedPaths, allowGitUnmanagedFiles);
|
|
125
124
|
}
|
|
126
125
|
|