@cnife/pi-miscs 0.2.0 → 0.2.1
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
CHANGED
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
auto 从 payload model 字段自动识别, 默认 deepseek
|
|
26
26
|
"""
|
|
27
27
|
|
|
28
|
+
import argparse
|
|
28
29
|
import json
|
|
29
30
|
import os
|
|
30
31
|
import shutil
|
|
@@ -78,25 +79,22 @@ TARGET = f"{SESSION}:1.1"
|
|
|
78
79
|
# ── CLI arg parsing ──────────────────────────────────────────
|
|
79
80
|
|
|
80
81
|
def parse_args():
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
args["dir"] = sys.argv[i]
|
|
98
|
-
i += 1
|
|
99
|
-
return args
|
|
82
|
+
parser = argparse.ArgumentParser(
|
|
83
|
+
description=__doc__,
|
|
84
|
+
formatter_class=argparse.RawDescriptionHelpFormatter,
|
|
85
|
+
)
|
|
86
|
+
parser.add_argument(
|
|
87
|
+
"--analyze-only", action="store_true", help="只分析已有 payload"
|
|
88
|
+
)
|
|
89
|
+
parser.add_argument(
|
|
90
|
+
"--tokenizer",
|
|
91
|
+
default="deepseek",
|
|
92
|
+
help="指定分词器 (deepseek/cl100k_base/o200k_base/auto)",
|
|
93
|
+
)
|
|
94
|
+
parser.add_argument(
|
|
95
|
+
"--dir", default=None, help="从指定目录分析 payload"
|
|
96
|
+
)
|
|
97
|
+
return vars(parser.parse_args())
|
|
100
98
|
|
|
101
99
|
|
|
102
100
|
# ── Phase 1: Capture ──────────────────────────────────────────
|