@autotest/agent 0.0.12 → 0.0.14
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 +112 -1
- package/dist/api/autotest_agent.d.ts +0 -1
- package/dist/autotest-cli.js +1 -1
- package/dist/common/config/output.d.ts +0 -1
- package/dist/common/config/types.d.ts +27 -27
- package/dist/common/layout_parser.d.ts +7 -0
- package/dist/common/llm_cache/prompt_cache.d.ts +26 -9
- package/dist/common/model/custom_model.d.ts +1 -7
- package/dist/core/agent/report_analyzer_agent/agent.d.ts +1 -1
- package/dist/core/agent/report_analyzer_agent/example_selector.d.ts +2 -0
- package/dist/core/agent/report_analyzer_agent/hooks.d.ts +2 -0
- package/dist/core/agent/report_analyzer_agent/prompts/examples/example_app_missing.md +6 -0
- package/dist/core/agent/report_analyzer_agent/prompts/examples/example_blocking_fact.md +8 -0
- package/dist/core/agent/report_analyzer_agent/prompts/examples/example_coord_offset.md +6 -0
- package/dist/core/agent/report_analyzer_agent/prompts/examples/example_inconclusive.md +6 -0
- package/dist/core/agent/report_analyzer_agent/prompts/examples/example_multi_cause.md +7 -0
- package/dist/core/agent/report_analyzer_agent/prompts/examples/example_pass_no_issue.md +6 -0
- package/dist/core/agent/report_analyzer_agent/stage_contracts.d.ts +5 -0
- package/dist/core/agent/report_analyzer_agent/types.d.ts +3 -0
- package/dist/core/agent/single_agent/agent.d.ts +27 -7
- package/dist/core/agent/single_agent/image_utils.d.ts +1 -1
- package/dist/core/device/hdc/capture_card_recorder.d.ts +90 -0
- package/dist/core/device/hdc/screen_recorder.d.ts +2 -1
- package/dist/core/mcp/mcp_tools.d.ts +0 -1
- package/dist/core/prompt/templates/single/single_v2.0.md +57 -51
- package/dist/generated/native_so_b64.d.ts +1 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +1 -1
- package/dist/loop/index.d.ts +9 -0
- package/dist/prompts/rewriter_v1.0.md +168 -0
- package/dist/reporter/generator.d.ts +2 -1
- package/dist/reporter/html_template/index.d.ts +7 -0
- package/dist/tools/batch_runner.js +1 -1
- package/dist/tools/case_runner/runner.js +1 -1
- package/dist/tools/config/config_tool.js +1 -1
- package/dist/tools/gen_report.d.ts +47 -0
- package/dist/tools/prompt_compare/compare_runner.js +1 -1
- package/package.json +2 -2
- package/dist/common/llm_cache/cache_transport.d.ts +0 -11
|
@@ -733,7 +733,6 @@ export declare const AgentConfigSchema: z.ZodObject<{
|
|
|
733
733
|
includePreviousScreenshot: z.ZodDefault<z.ZodBoolean>;
|
|
734
734
|
previousScreenshotCompressRatio: z.ZodDefault<z.ZodNumber>;
|
|
735
735
|
actionMarkers: z.ZodDefault<z.ZodBoolean>;
|
|
736
|
-
enableCache: z.ZodDefault<z.ZodBoolean>;
|
|
737
736
|
parseMode: z.ZodDefault<z.ZodString>;
|
|
738
737
|
toolProvider: z.ZodDefault<z.ZodString>;
|
|
739
738
|
promptName: z.ZodDefault<z.ZodString>;
|
|
@@ -745,6 +744,7 @@ export declare const AgentConfigSchema: z.ZodObject<{
|
|
|
745
744
|
screenshotOnToolEnd: z.ZodDefault<z.ZodBoolean>;
|
|
746
745
|
minimalInject: z.ZodDefault<z.ZodBoolean>;
|
|
747
746
|
enableAttributionAnalysis: z.ZodDefault<z.ZodBoolean>;
|
|
747
|
+
useRecordingMode: z.ZodDefault<z.ZodBoolean>;
|
|
748
748
|
}, "strip", z.ZodTypeAny, {
|
|
749
749
|
mode?: "single" | "hypium" | "layered";
|
|
750
750
|
maxSteps?: number;
|
|
@@ -767,7 +767,6 @@ export declare const AgentConfigSchema: z.ZodObject<{
|
|
|
767
767
|
includePreviousScreenshot?: boolean;
|
|
768
768
|
previousScreenshotCompressRatio?: number;
|
|
769
769
|
actionMarkers?: boolean;
|
|
770
|
-
enableCache?: boolean;
|
|
771
770
|
parseMode?: string;
|
|
772
771
|
toolProvider?: string;
|
|
773
772
|
promptName?: string;
|
|
@@ -779,6 +778,7 @@ export declare const AgentConfigSchema: z.ZodObject<{
|
|
|
779
778
|
screenshotOnToolEnd?: boolean;
|
|
780
779
|
minimalInject?: boolean;
|
|
781
780
|
enableAttributionAnalysis?: boolean;
|
|
781
|
+
useRecordingMode?: boolean;
|
|
782
782
|
}, {
|
|
783
783
|
mode?: "single" | "hypium" | "layered";
|
|
784
784
|
maxSteps?: number;
|
|
@@ -801,7 +801,6 @@ export declare const AgentConfigSchema: z.ZodObject<{
|
|
|
801
801
|
includePreviousScreenshot?: boolean;
|
|
802
802
|
previousScreenshotCompressRatio?: number;
|
|
803
803
|
actionMarkers?: boolean;
|
|
804
|
-
enableCache?: boolean;
|
|
805
804
|
parseMode?: string;
|
|
806
805
|
toolProvider?: string;
|
|
807
806
|
promptName?: string;
|
|
@@ -813,6 +812,7 @@ export declare const AgentConfigSchema: z.ZodObject<{
|
|
|
813
812
|
screenshotOnToolEnd?: boolean;
|
|
814
813
|
minimalInject?: boolean;
|
|
815
814
|
enableAttributionAnalysis?: boolean;
|
|
815
|
+
useRecordingMode?: boolean;
|
|
816
816
|
}>;
|
|
817
817
|
export type AgentConfig = z.infer<typeof AgentConfigSchema>;
|
|
818
818
|
/**
|
|
@@ -844,7 +844,6 @@ declare const AgentGroupConfigSchema: z.ZodObject<{
|
|
|
844
844
|
includePreviousScreenshot: z.ZodDefault<z.ZodBoolean>;
|
|
845
845
|
previousScreenshotCompressRatio: z.ZodDefault<z.ZodNumber>;
|
|
846
846
|
actionMarkers: z.ZodDefault<z.ZodBoolean>;
|
|
847
|
-
enableCache: z.ZodDefault<z.ZodBoolean>;
|
|
848
847
|
parseMode: z.ZodDefault<z.ZodString>;
|
|
849
848
|
toolProvider: z.ZodDefault<z.ZodString>;
|
|
850
849
|
promptName: z.ZodDefault<z.ZodString>;
|
|
@@ -856,6 +855,7 @@ declare const AgentGroupConfigSchema: z.ZodObject<{
|
|
|
856
855
|
screenshotOnToolEnd: z.ZodDefault<z.ZodBoolean>;
|
|
857
856
|
minimalInject: z.ZodDefault<z.ZodBoolean>;
|
|
858
857
|
enableAttributionAnalysis: z.ZodDefault<z.ZodBoolean>;
|
|
858
|
+
useRecordingMode: z.ZodDefault<z.ZodBoolean>;
|
|
859
859
|
}, "strip", z.ZodTypeAny, {
|
|
860
860
|
mode?: "single" | "hypium" | "layered";
|
|
861
861
|
maxSteps?: number;
|
|
@@ -878,7 +878,6 @@ declare const AgentGroupConfigSchema: z.ZodObject<{
|
|
|
878
878
|
includePreviousScreenshot?: boolean;
|
|
879
879
|
previousScreenshotCompressRatio?: number;
|
|
880
880
|
actionMarkers?: boolean;
|
|
881
|
-
enableCache?: boolean;
|
|
882
881
|
parseMode?: string;
|
|
883
882
|
toolProvider?: string;
|
|
884
883
|
promptName?: string;
|
|
@@ -890,6 +889,7 @@ declare const AgentGroupConfigSchema: z.ZodObject<{
|
|
|
890
889
|
screenshotOnToolEnd?: boolean;
|
|
891
890
|
minimalInject?: boolean;
|
|
892
891
|
enableAttributionAnalysis?: boolean;
|
|
892
|
+
useRecordingMode?: boolean;
|
|
893
893
|
}, {
|
|
894
894
|
mode?: "single" | "hypium" | "layered";
|
|
895
895
|
maxSteps?: number;
|
|
@@ -912,7 +912,6 @@ declare const AgentGroupConfigSchema: z.ZodObject<{
|
|
|
912
912
|
includePreviousScreenshot?: boolean;
|
|
913
913
|
previousScreenshotCompressRatio?: number;
|
|
914
914
|
actionMarkers?: boolean;
|
|
915
|
-
enableCache?: boolean;
|
|
916
915
|
parseMode?: string;
|
|
917
916
|
toolProvider?: string;
|
|
918
917
|
promptName?: string;
|
|
@@ -924,6 +923,7 @@ declare const AgentGroupConfigSchema: z.ZodObject<{
|
|
|
924
923
|
screenshotOnToolEnd?: boolean;
|
|
925
924
|
minimalInject?: boolean;
|
|
926
925
|
enableAttributionAnalysis?: boolean;
|
|
926
|
+
useRecordingMode?: boolean;
|
|
927
927
|
}>>;
|
|
928
928
|
extraAgents: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
929
929
|
mode: z.ZodDefault<z.ZodEnum<["single", "hypium", "layered"]>>;
|
|
@@ -947,7 +947,6 @@ declare const AgentGroupConfigSchema: z.ZodObject<{
|
|
|
947
947
|
includePreviousScreenshot: z.ZodDefault<z.ZodBoolean>;
|
|
948
948
|
previousScreenshotCompressRatio: z.ZodDefault<z.ZodNumber>;
|
|
949
949
|
actionMarkers: z.ZodDefault<z.ZodBoolean>;
|
|
950
|
-
enableCache: z.ZodDefault<z.ZodBoolean>;
|
|
951
950
|
parseMode: z.ZodDefault<z.ZodString>;
|
|
952
951
|
toolProvider: z.ZodDefault<z.ZodString>;
|
|
953
952
|
promptName: z.ZodDefault<z.ZodString>;
|
|
@@ -959,6 +958,7 @@ declare const AgentGroupConfigSchema: z.ZodObject<{
|
|
|
959
958
|
screenshotOnToolEnd: z.ZodDefault<z.ZodBoolean>;
|
|
960
959
|
minimalInject: z.ZodDefault<z.ZodBoolean>;
|
|
961
960
|
enableAttributionAnalysis: z.ZodDefault<z.ZodBoolean>;
|
|
961
|
+
useRecordingMode: z.ZodDefault<z.ZodBoolean>;
|
|
962
962
|
}, "strip", z.ZodTypeAny, {
|
|
963
963
|
mode?: "single" | "hypium" | "layered";
|
|
964
964
|
maxSteps?: number;
|
|
@@ -981,7 +981,6 @@ declare const AgentGroupConfigSchema: z.ZodObject<{
|
|
|
981
981
|
includePreviousScreenshot?: boolean;
|
|
982
982
|
previousScreenshotCompressRatio?: number;
|
|
983
983
|
actionMarkers?: boolean;
|
|
984
|
-
enableCache?: boolean;
|
|
985
984
|
parseMode?: string;
|
|
986
985
|
toolProvider?: string;
|
|
987
986
|
promptName?: string;
|
|
@@ -993,6 +992,7 @@ declare const AgentGroupConfigSchema: z.ZodObject<{
|
|
|
993
992
|
screenshotOnToolEnd?: boolean;
|
|
994
993
|
minimalInject?: boolean;
|
|
995
994
|
enableAttributionAnalysis?: boolean;
|
|
995
|
+
useRecordingMode?: boolean;
|
|
996
996
|
}, {
|
|
997
997
|
mode?: "single" | "hypium" | "layered";
|
|
998
998
|
maxSteps?: number;
|
|
@@ -1015,7 +1015,6 @@ declare const AgentGroupConfigSchema: z.ZodObject<{
|
|
|
1015
1015
|
includePreviousScreenshot?: boolean;
|
|
1016
1016
|
previousScreenshotCompressRatio?: number;
|
|
1017
1017
|
actionMarkers?: boolean;
|
|
1018
|
-
enableCache?: boolean;
|
|
1019
1018
|
parseMode?: string;
|
|
1020
1019
|
toolProvider?: string;
|
|
1021
1020
|
promptName?: string;
|
|
@@ -1027,6 +1026,7 @@ declare const AgentGroupConfigSchema: z.ZodObject<{
|
|
|
1027
1026
|
screenshotOnToolEnd?: boolean;
|
|
1028
1027
|
minimalInject?: boolean;
|
|
1029
1028
|
enableAttributionAnalysis?: boolean;
|
|
1029
|
+
useRecordingMode?: boolean;
|
|
1030
1030
|
}>>>;
|
|
1031
1031
|
}, "strip", z.ZodTypeAny, {
|
|
1032
1032
|
unified?: {
|
|
@@ -1051,7 +1051,6 @@ declare const AgentGroupConfigSchema: z.ZodObject<{
|
|
|
1051
1051
|
includePreviousScreenshot?: boolean;
|
|
1052
1052
|
previousScreenshotCompressRatio?: number;
|
|
1053
1053
|
actionMarkers?: boolean;
|
|
1054
|
-
enableCache?: boolean;
|
|
1055
1054
|
parseMode?: string;
|
|
1056
1055
|
toolProvider?: string;
|
|
1057
1056
|
promptName?: string;
|
|
@@ -1063,6 +1062,7 @@ declare const AgentGroupConfigSchema: z.ZodObject<{
|
|
|
1063
1062
|
screenshotOnToolEnd?: boolean;
|
|
1064
1063
|
minimalInject?: boolean;
|
|
1065
1064
|
enableAttributionAnalysis?: boolean;
|
|
1065
|
+
useRecordingMode?: boolean;
|
|
1066
1066
|
};
|
|
1067
1067
|
extraAgents?: Record<string, {
|
|
1068
1068
|
mode?: "single" | "hypium" | "layered";
|
|
@@ -1086,7 +1086,6 @@ declare const AgentGroupConfigSchema: z.ZodObject<{
|
|
|
1086
1086
|
includePreviousScreenshot?: boolean;
|
|
1087
1087
|
previousScreenshotCompressRatio?: number;
|
|
1088
1088
|
actionMarkers?: boolean;
|
|
1089
|
-
enableCache?: boolean;
|
|
1090
1089
|
parseMode?: string;
|
|
1091
1090
|
toolProvider?: string;
|
|
1092
1091
|
promptName?: string;
|
|
@@ -1098,6 +1097,7 @@ declare const AgentGroupConfigSchema: z.ZodObject<{
|
|
|
1098
1097
|
screenshotOnToolEnd?: boolean;
|
|
1099
1098
|
minimalInject?: boolean;
|
|
1100
1099
|
enableAttributionAnalysis?: boolean;
|
|
1100
|
+
useRecordingMode?: boolean;
|
|
1101
1101
|
}>;
|
|
1102
1102
|
}, {
|
|
1103
1103
|
unified?: {
|
|
@@ -1122,7 +1122,6 @@ declare const AgentGroupConfigSchema: z.ZodObject<{
|
|
|
1122
1122
|
includePreviousScreenshot?: boolean;
|
|
1123
1123
|
previousScreenshotCompressRatio?: number;
|
|
1124
1124
|
actionMarkers?: boolean;
|
|
1125
|
-
enableCache?: boolean;
|
|
1126
1125
|
parseMode?: string;
|
|
1127
1126
|
toolProvider?: string;
|
|
1128
1127
|
promptName?: string;
|
|
@@ -1134,6 +1133,7 @@ declare const AgentGroupConfigSchema: z.ZodObject<{
|
|
|
1134
1133
|
screenshotOnToolEnd?: boolean;
|
|
1135
1134
|
minimalInject?: boolean;
|
|
1136
1135
|
enableAttributionAnalysis?: boolean;
|
|
1136
|
+
useRecordingMode?: boolean;
|
|
1137
1137
|
};
|
|
1138
1138
|
extraAgents?: Record<string, {
|
|
1139
1139
|
mode?: "single" | "hypium" | "layered";
|
|
@@ -1157,7 +1157,6 @@ declare const AgentGroupConfigSchema: z.ZodObject<{
|
|
|
1157
1157
|
includePreviousScreenshot?: boolean;
|
|
1158
1158
|
previousScreenshotCompressRatio?: number;
|
|
1159
1159
|
actionMarkers?: boolean;
|
|
1160
|
-
enableCache?: boolean;
|
|
1161
1160
|
parseMode?: string;
|
|
1162
1161
|
toolProvider?: string;
|
|
1163
1162
|
promptName?: string;
|
|
@@ -1169,6 +1168,7 @@ declare const AgentGroupConfigSchema: z.ZodObject<{
|
|
|
1169
1168
|
screenshotOnToolEnd?: boolean;
|
|
1170
1169
|
minimalInject?: boolean;
|
|
1171
1170
|
enableAttributionAnalysis?: boolean;
|
|
1171
|
+
useRecordingMode?: boolean;
|
|
1172
1172
|
}>;
|
|
1173
1173
|
}>;
|
|
1174
1174
|
export type AgentGroupConfig = z.infer<typeof AgentGroupConfigSchema>;
|
|
@@ -1892,7 +1892,6 @@ export declare const AppConfigSchema: z.ZodObject<{
|
|
|
1892
1892
|
includePreviousScreenshot: z.ZodDefault<z.ZodBoolean>;
|
|
1893
1893
|
previousScreenshotCompressRatio: z.ZodDefault<z.ZodNumber>;
|
|
1894
1894
|
actionMarkers: z.ZodDefault<z.ZodBoolean>;
|
|
1895
|
-
enableCache: z.ZodDefault<z.ZodBoolean>;
|
|
1896
1895
|
parseMode: z.ZodDefault<z.ZodString>;
|
|
1897
1896
|
toolProvider: z.ZodDefault<z.ZodString>;
|
|
1898
1897
|
promptName: z.ZodDefault<z.ZodString>;
|
|
@@ -1904,6 +1903,7 @@ export declare const AppConfigSchema: z.ZodObject<{
|
|
|
1904
1903
|
screenshotOnToolEnd: z.ZodDefault<z.ZodBoolean>;
|
|
1905
1904
|
minimalInject: z.ZodDefault<z.ZodBoolean>;
|
|
1906
1905
|
enableAttributionAnalysis: z.ZodDefault<z.ZodBoolean>;
|
|
1906
|
+
useRecordingMode: z.ZodDefault<z.ZodBoolean>;
|
|
1907
1907
|
}, "strip", z.ZodTypeAny, {
|
|
1908
1908
|
mode?: "single" | "hypium" | "layered";
|
|
1909
1909
|
maxSteps?: number;
|
|
@@ -1926,7 +1926,6 @@ export declare const AppConfigSchema: z.ZodObject<{
|
|
|
1926
1926
|
includePreviousScreenshot?: boolean;
|
|
1927
1927
|
previousScreenshotCompressRatio?: number;
|
|
1928
1928
|
actionMarkers?: boolean;
|
|
1929
|
-
enableCache?: boolean;
|
|
1930
1929
|
parseMode?: string;
|
|
1931
1930
|
toolProvider?: string;
|
|
1932
1931
|
promptName?: string;
|
|
@@ -1938,6 +1937,7 @@ export declare const AppConfigSchema: z.ZodObject<{
|
|
|
1938
1937
|
screenshotOnToolEnd?: boolean;
|
|
1939
1938
|
minimalInject?: boolean;
|
|
1940
1939
|
enableAttributionAnalysis?: boolean;
|
|
1940
|
+
useRecordingMode?: boolean;
|
|
1941
1941
|
}, {
|
|
1942
1942
|
mode?: "single" | "hypium" | "layered";
|
|
1943
1943
|
maxSteps?: number;
|
|
@@ -1960,7 +1960,6 @@ export declare const AppConfigSchema: z.ZodObject<{
|
|
|
1960
1960
|
includePreviousScreenshot?: boolean;
|
|
1961
1961
|
previousScreenshotCompressRatio?: number;
|
|
1962
1962
|
actionMarkers?: boolean;
|
|
1963
|
-
enableCache?: boolean;
|
|
1964
1963
|
parseMode?: string;
|
|
1965
1964
|
toolProvider?: string;
|
|
1966
1965
|
promptName?: string;
|
|
@@ -1972,6 +1971,7 @@ export declare const AppConfigSchema: z.ZodObject<{
|
|
|
1972
1971
|
screenshotOnToolEnd?: boolean;
|
|
1973
1972
|
minimalInject?: boolean;
|
|
1974
1973
|
enableAttributionAnalysis?: boolean;
|
|
1974
|
+
useRecordingMode?: boolean;
|
|
1975
1975
|
}>>;
|
|
1976
1976
|
extraAgents: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
1977
1977
|
mode: z.ZodDefault<z.ZodEnum<["single", "hypium", "layered"]>>;
|
|
@@ -1995,7 +1995,6 @@ export declare const AppConfigSchema: z.ZodObject<{
|
|
|
1995
1995
|
includePreviousScreenshot: z.ZodDefault<z.ZodBoolean>;
|
|
1996
1996
|
previousScreenshotCompressRatio: z.ZodDefault<z.ZodNumber>;
|
|
1997
1997
|
actionMarkers: z.ZodDefault<z.ZodBoolean>;
|
|
1998
|
-
enableCache: z.ZodDefault<z.ZodBoolean>;
|
|
1999
1998
|
parseMode: z.ZodDefault<z.ZodString>;
|
|
2000
1999
|
toolProvider: z.ZodDefault<z.ZodString>;
|
|
2001
2000
|
promptName: z.ZodDefault<z.ZodString>;
|
|
@@ -2007,6 +2006,7 @@ export declare const AppConfigSchema: z.ZodObject<{
|
|
|
2007
2006
|
screenshotOnToolEnd: z.ZodDefault<z.ZodBoolean>;
|
|
2008
2007
|
minimalInject: z.ZodDefault<z.ZodBoolean>;
|
|
2009
2008
|
enableAttributionAnalysis: z.ZodDefault<z.ZodBoolean>;
|
|
2009
|
+
useRecordingMode: z.ZodDefault<z.ZodBoolean>;
|
|
2010
2010
|
}, "strip", z.ZodTypeAny, {
|
|
2011
2011
|
mode?: "single" | "hypium" | "layered";
|
|
2012
2012
|
maxSteps?: number;
|
|
@@ -2029,7 +2029,6 @@ export declare const AppConfigSchema: z.ZodObject<{
|
|
|
2029
2029
|
includePreviousScreenshot?: boolean;
|
|
2030
2030
|
previousScreenshotCompressRatio?: number;
|
|
2031
2031
|
actionMarkers?: boolean;
|
|
2032
|
-
enableCache?: boolean;
|
|
2033
2032
|
parseMode?: string;
|
|
2034
2033
|
toolProvider?: string;
|
|
2035
2034
|
promptName?: string;
|
|
@@ -2041,6 +2040,7 @@ export declare const AppConfigSchema: z.ZodObject<{
|
|
|
2041
2040
|
screenshotOnToolEnd?: boolean;
|
|
2042
2041
|
minimalInject?: boolean;
|
|
2043
2042
|
enableAttributionAnalysis?: boolean;
|
|
2043
|
+
useRecordingMode?: boolean;
|
|
2044
2044
|
}, {
|
|
2045
2045
|
mode?: "single" | "hypium" | "layered";
|
|
2046
2046
|
maxSteps?: number;
|
|
@@ -2063,7 +2063,6 @@ export declare const AppConfigSchema: z.ZodObject<{
|
|
|
2063
2063
|
includePreviousScreenshot?: boolean;
|
|
2064
2064
|
previousScreenshotCompressRatio?: number;
|
|
2065
2065
|
actionMarkers?: boolean;
|
|
2066
|
-
enableCache?: boolean;
|
|
2067
2066
|
parseMode?: string;
|
|
2068
2067
|
toolProvider?: string;
|
|
2069
2068
|
promptName?: string;
|
|
@@ -2075,6 +2074,7 @@ export declare const AppConfigSchema: z.ZodObject<{
|
|
|
2075
2074
|
screenshotOnToolEnd?: boolean;
|
|
2076
2075
|
minimalInject?: boolean;
|
|
2077
2076
|
enableAttributionAnalysis?: boolean;
|
|
2077
|
+
useRecordingMode?: boolean;
|
|
2078
2078
|
}>>>;
|
|
2079
2079
|
}, "strip", z.ZodTypeAny, {
|
|
2080
2080
|
unified?: {
|
|
@@ -2099,7 +2099,6 @@ export declare const AppConfigSchema: z.ZodObject<{
|
|
|
2099
2099
|
includePreviousScreenshot?: boolean;
|
|
2100
2100
|
previousScreenshotCompressRatio?: number;
|
|
2101
2101
|
actionMarkers?: boolean;
|
|
2102
|
-
enableCache?: boolean;
|
|
2103
2102
|
parseMode?: string;
|
|
2104
2103
|
toolProvider?: string;
|
|
2105
2104
|
promptName?: string;
|
|
@@ -2111,6 +2110,7 @@ export declare const AppConfigSchema: z.ZodObject<{
|
|
|
2111
2110
|
screenshotOnToolEnd?: boolean;
|
|
2112
2111
|
minimalInject?: boolean;
|
|
2113
2112
|
enableAttributionAnalysis?: boolean;
|
|
2113
|
+
useRecordingMode?: boolean;
|
|
2114
2114
|
};
|
|
2115
2115
|
extraAgents?: Record<string, {
|
|
2116
2116
|
mode?: "single" | "hypium" | "layered";
|
|
@@ -2134,7 +2134,6 @@ export declare const AppConfigSchema: z.ZodObject<{
|
|
|
2134
2134
|
includePreviousScreenshot?: boolean;
|
|
2135
2135
|
previousScreenshotCompressRatio?: number;
|
|
2136
2136
|
actionMarkers?: boolean;
|
|
2137
|
-
enableCache?: boolean;
|
|
2138
2137
|
parseMode?: string;
|
|
2139
2138
|
toolProvider?: string;
|
|
2140
2139
|
promptName?: string;
|
|
@@ -2146,6 +2145,7 @@ export declare const AppConfigSchema: z.ZodObject<{
|
|
|
2146
2145
|
screenshotOnToolEnd?: boolean;
|
|
2147
2146
|
minimalInject?: boolean;
|
|
2148
2147
|
enableAttributionAnalysis?: boolean;
|
|
2148
|
+
useRecordingMode?: boolean;
|
|
2149
2149
|
}>;
|
|
2150
2150
|
}, {
|
|
2151
2151
|
unified?: {
|
|
@@ -2170,7 +2170,6 @@ export declare const AppConfigSchema: z.ZodObject<{
|
|
|
2170
2170
|
includePreviousScreenshot?: boolean;
|
|
2171
2171
|
previousScreenshotCompressRatio?: number;
|
|
2172
2172
|
actionMarkers?: boolean;
|
|
2173
|
-
enableCache?: boolean;
|
|
2174
2173
|
parseMode?: string;
|
|
2175
2174
|
toolProvider?: string;
|
|
2176
2175
|
promptName?: string;
|
|
@@ -2182,6 +2181,7 @@ export declare const AppConfigSchema: z.ZodObject<{
|
|
|
2182
2181
|
screenshotOnToolEnd?: boolean;
|
|
2183
2182
|
minimalInject?: boolean;
|
|
2184
2183
|
enableAttributionAnalysis?: boolean;
|
|
2184
|
+
useRecordingMode?: boolean;
|
|
2185
2185
|
};
|
|
2186
2186
|
extraAgents?: Record<string, {
|
|
2187
2187
|
mode?: "single" | "hypium" | "layered";
|
|
@@ -2205,7 +2205,6 @@ export declare const AppConfigSchema: z.ZodObject<{
|
|
|
2205
2205
|
includePreviousScreenshot?: boolean;
|
|
2206
2206
|
previousScreenshotCompressRatio?: number;
|
|
2207
2207
|
actionMarkers?: boolean;
|
|
2208
|
-
enableCache?: boolean;
|
|
2209
2208
|
parseMode?: string;
|
|
2210
2209
|
toolProvider?: string;
|
|
2211
2210
|
promptName?: string;
|
|
@@ -2217,6 +2216,7 @@ export declare const AppConfigSchema: z.ZodObject<{
|
|
|
2217
2216
|
screenshotOnToolEnd?: boolean;
|
|
2218
2217
|
minimalInject?: boolean;
|
|
2219
2218
|
enableAttributionAnalysis?: boolean;
|
|
2219
|
+
useRecordingMode?: boolean;
|
|
2220
2220
|
}>;
|
|
2221
2221
|
}>>;
|
|
2222
2222
|
log: z.ZodDefault<z.ZodObject<{
|
|
@@ -2620,7 +2620,6 @@ export declare const AppConfigSchema: z.ZodObject<{
|
|
|
2620
2620
|
includePreviousScreenshot?: boolean;
|
|
2621
2621
|
previousScreenshotCompressRatio?: number;
|
|
2622
2622
|
actionMarkers?: boolean;
|
|
2623
|
-
enableCache?: boolean;
|
|
2624
2623
|
parseMode?: string;
|
|
2625
2624
|
toolProvider?: string;
|
|
2626
2625
|
promptName?: string;
|
|
@@ -2632,6 +2631,7 @@ export declare const AppConfigSchema: z.ZodObject<{
|
|
|
2632
2631
|
screenshotOnToolEnd?: boolean;
|
|
2633
2632
|
minimalInject?: boolean;
|
|
2634
2633
|
enableAttributionAnalysis?: boolean;
|
|
2634
|
+
useRecordingMode?: boolean;
|
|
2635
2635
|
};
|
|
2636
2636
|
extraAgents?: Record<string, {
|
|
2637
2637
|
mode?: "single" | "hypium" | "layered";
|
|
@@ -2655,7 +2655,6 @@ export declare const AppConfigSchema: z.ZodObject<{
|
|
|
2655
2655
|
includePreviousScreenshot?: boolean;
|
|
2656
2656
|
previousScreenshotCompressRatio?: number;
|
|
2657
2657
|
actionMarkers?: boolean;
|
|
2658
|
-
enableCache?: boolean;
|
|
2659
2658
|
parseMode?: string;
|
|
2660
2659
|
toolProvider?: string;
|
|
2661
2660
|
promptName?: string;
|
|
@@ -2667,6 +2666,7 @@ export declare const AppConfigSchema: z.ZodObject<{
|
|
|
2667
2666
|
screenshotOnToolEnd?: boolean;
|
|
2668
2667
|
minimalInject?: boolean;
|
|
2669
2668
|
enableAttributionAnalysis?: boolean;
|
|
2669
|
+
useRecordingMode?: boolean;
|
|
2670
2670
|
}>;
|
|
2671
2671
|
};
|
|
2672
2672
|
log?: {
|
|
@@ -2903,7 +2903,6 @@ export declare const AppConfigSchema: z.ZodObject<{
|
|
|
2903
2903
|
includePreviousScreenshot?: boolean;
|
|
2904
2904
|
previousScreenshotCompressRatio?: number;
|
|
2905
2905
|
actionMarkers?: boolean;
|
|
2906
|
-
enableCache?: boolean;
|
|
2907
2906
|
parseMode?: string;
|
|
2908
2907
|
toolProvider?: string;
|
|
2909
2908
|
promptName?: string;
|
|
@@ -2915,6 +2914,7 @@ export declare const AppConfigSchema: z.ZodObject<{
|
|
|
2915
2914
|
screenshotOnToolEnd?: boolean;
|
|
2916
2915
|
minimalInject?: boolean;
|
|
2917
2916
|
enableAttributionAnalysis?: boolean;
|
|
2917
|
+
useRecordingMode?: boolean;
|
|
2918
2918
|
};
|
|
2919
2919
|
extraAgents?: Record<string, {
|
|
2920
2920
|
mode?: "single" | "hypium" | "layered";
|
|
@@ -2938,7 +2938,6 @@ export declare const AppConfigSchema: z.ZodObject<{
|
|
|
2938
2938
|
includePreviousScreenshot?: boolean;
|
|
2939
2939
|
previousScreenshotCompressRatio?: number;
|
|
2940
2940
|
actionMarkers?: boolean;
|
|
2941
|
-
enableCache?: boolean;
|
|
2942
2941
|
parseMode?: string;
|
|
2943
2942
|
toolProvider?: string;
|
|
2944
2943
|
promptName?: string;
|
|
@@ -2950,6 +2949,7 @@ export declare const AppConfigSchema: z.ZodObject<{
|
|
|
2950
2949
|
screenshotOnToolEnd?: boolean;
|
|
2951
2950
|
minimalInject?: boolean;
|
|
2952
2951
|
enableAttributionAnalysis?: boolean;
|
|
2952
|
+
useRecordingMode?: boolean;
|
|
2953
2953
|
}>;
|
|
2954
2954
|
};
|
|
2955
2955
|
log?: {
|
|
@@ -4,6 +4,13 @@
|
|
|
4
4
|
* (e.g. clicking the video instead of the like button) without sending
|
|
5
5
|
* the full control tree to the LLM — zero extra tokens.
|
|
6
6
|
*/
|
|
7
|
+
export declare function findClickableByText(layoutData: string, screenWidth: number, screenHeight: number, text: string, preferX?: number, preferY?: number): {
|
|
8
|
+
x: number;
|
|
9
|
+
y: number;
|
|
10
|
+
found: boolean;
|
|
11
|
+
dist: number;
|
|
12
|
+
matched: string;
|
|
13
|
+
};
|
|
7
14
|
/**
|
|
8
15
|
* Snap a normalized (0-1) coordinate to the center of the nearest clickable
|
|
9
16
|
* element from the layout tree, if within `threshold` distance.
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* DashScope 上下文缓存注入器(
|
|
2
|
+
* DashScope 上下文缓存注入器(strategy pattern)。
|
|
3
3
|
*
|
|
4
4
|
* 在 HTTP 请求发出前,在 system message 上添加 `cache_control: {"type": "ephemeral"}` 标记,
|
|
5
5
|
* 使 DashScope 复用前缀 token(节省 system prompt 重复计费)。
|
|
6
6
|
*
|
|
7
|
-
* **重要**:这是 DashScope 服务端上下文缓存(prefix token reuse
|
|
8
|
-
* 中的本地响应缓存(memoization)是两套机制。本模块只注入请求体标记,不缓存响应。
|
|
7
|
+
* **重要**:这是 DashScope 服务端上下文缓存(prefix token reuse),不缓存响应。
|
|
9
8
|
*
|
|
10
9
|
* DashScope 官方文档:https://help.aliyun.com/zh/model-studio/context-cache
|
|
11
10
|
*/
|
|
@@ -34,20 +33,38 @@ interface RequestBodyLike {
|
|
|
34
33
|
*/
|
|
35
34
|
export declare function addCacheControlToSystemMessage(messages: MessageLike[]): boolean;
|
|
36
35
|
/**
|
|
37
|
-
*
|
|
36
|
+
* 缓存策略抽象基类。
|
|
38
37
|
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
38
|
+
* 每个 provider(如 DashScope)实现自己的 supports() 判定和 inject() 注入逻辑,
|
|
39
|
+
* 由 injectPromptCache 按 CACHE_STRATEGIES 注册顺序分发。
|
|
41
40
|
*/
|
|
42
|
-
export declare
|
|
41
|
+
export declare abstract class CacheStrategy {
|
|
42
|
+
abstract supports(baseUrl: string, modelName: string): boolean;
|
|
43
|
+
abstract inject(body: RequestBodyLike, baseUrl: string, modelName: string): boolean;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* DashScope(阿里云)缓存策略。
|
|
47
|
+
*
|
|
48
|
+
* supports(): 通过 base_url 包含 "dashscope" 判定。
|
|
49
|
+
* inject(): 模型名按前缀匹配,避免误注入到不支持缓存的模型导致 400 错误。
|
|
50
|
+
*/
|
|
51
|
+
export declare class DashScopeCacheStrategy extends CacheStrategy {
|
|
52
|
+
supports(baseUrl: string, _modelName: string): boolean;
|
|
53
|
+
inject(body: RequestBodyLike, _baseUrl: string, modelName: string): boolean;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* 缓存策略注册表。injectPromptCache 按顺序匹配第一个 supports() 返回 true 的策略。
|
|
57
|
+
*/
|
|
58
|
+
export declare const CACHE_STRATEGIES: CacheStrategy[];
|
|
43
59
|
/**
|
|
44
60
|
* 在请求体上注入 cache_control(原地修改 body.messages)。
|
|
45
61
|
*
|
|
62
|
+
* 遍历 CACHE_STRATEGIES,找到第一个 supports() 返回 true 的策略,调用其 inject()。
|
|
63
|
+
*
|
|
46
64
|
* @param body 请求体(包含 messages 数组)
|
|
47
65
|
* @param baseUrl LLM API 基础 URL
|
|
48
66
|
* @param modelName 模型名
|
|
49
|
-
* @param enabled 是否启用(受 agent.unified.enableCache 控制,
|
|
50
67
|
* @returns True 表示修改了 body(调用方需要重新序列化),False 表示不需要缓存
|
|
51
68
|
*/
|
|
52
|
-
export declare function injectPromptCache(body: RequestBodyLike, baseUrl: string, modelName: string
|
|
69
|
+
export declare function injectPromptCache(body: RequestBodyLike, baseUrl: string, modelName: string): boolean;
|
|
53
70
|
export {};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { type ModelMessage } from 'ai';
|
|
2
2
|
import type { ModelConfig } from '../../common/config/types';
|
|
3
3
|
import { TokenUsage, DashScopeTokenUsage } from '../../common/usage/token_usage';
|
|
4
|
-
import { CacheTransport } from '../llm_cache/cache_transport';
|
|
5
4
|
import type { FetchLike } from '../dfx/recording_fetch';
|
|
6
5
|
export interface LLMCallOptions {
|
|
7
6
|
systemPrompt?: string;
|
|
@@ -11,7 +10,6 @@ export interface LLMCallOptions {
|
|
|
11
10
|
mimeType?: string;
|
|
12
11
|
}>;
|
|
13
12
|
modelConfig: ModelConfig;
|
|
14
|
-
cacheTransport?: CacheTransport;
|
|
15
13
|
extraBody?: Record<string, unknown>;
|
|
16
14
|
tools?: Record<string, unknown>;
|
|
17
15
|
}
|
|
@@ -35,17 +33,13 @@ export interface LLMCallMessagesOptions {
|
|
|
35
33
|
systemPrompt?: string;
|
|
36
34
|
tools?: Record<string, unknown>;
|
|
37
35
|
modelConfig: ModelConfig;
|
|
38
|
-
cacheTransport?: CacheTransport;
|
|
39
36
|
extraBody?: Record<string, unknown>;
|
|
40
37
|
}
|
|
41
38
|
export declare class LLMCaller {
|
|
42
|
-
private cacheTransport;
|
|
43
39
|
private recordingFetch?;
|
|
44
|
-
constructor(
|
|
40
|
+
constructor(recordingFetch?: FetchLike);
|
|
45
41
|
private createProvider;
|
|
46
42
|
private buildMessages;
|
|
47
|
-
private computeCacheKey;
|
|
48
43
|
call(opts: LLMCallOptions): Promise<LLMCallResult>;
|
|
49
44
|
callWithMessages(opts: LLMCallMessagesOptions): Promise<LLMCallResult>;
|
|
50
|
-
private computeMessagesCacheKey;
|
|
51
45
|
}
|
|
@@ -12,7 +12,7 @@ export declare class ReportAnalyzerAgent {
|
|
|
12
12
|
runFromData(reportData: ReportData, reportDir?: string): Promise<AnalyzerOutput>;
|
|
13
13
|
private precheck;
|
|
14
14
|
private runAgentWithRetry;
|
|
15
|
-
private
|
|
15
|
+
private runStageLoop;
|
|
16
16
|
private parseToolCallMarkers;
|
|
17
17
|
private buildInitialInput;
|
|
18
18
|
private formatPlannerOutput;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { AnalyzerContext, PendingImage } from './types';
|
|
2
2
|
export declare class AnalyzerHooks {
|
|
3
|
+
injectStageContract(context: AnalyzerContext): string;
|
|
3
4
|
drainPendingImages(context: AnalyzerContext): PendingImage[];
|
|
4
5
|
clearPendingImages(context: AnalyzerContext): void;
|
|
6
|
+
resetStageState(context: AnalyzerContext): void;
|
|
5
7
|
}
|
|
@@ -23,6 +23,7 @@ export declare enum AccuracyVerdict {
|
|
|
23
23
|
export declare const ROOT_CAUSE_SUB_CATEGORIES: Record<string, Record<string, string>>;
|
|
24
24
|
export declare const VALID_ACCURACY_VALUES: Set<string>;
|
|
25
25
|
export declare const ACCURACY_CN_TO_EN: Record<string, string>;
|
|
26
|
+
export declare const SUB_CATEGORY_CN_TO_EN: Record<string, string>;
|
|
26
27
|
export declare const VALID_CATEGORY_LABELS: Set<string>;
|
|
27
28
|
export declare function resolveSubCategory(subText: string, catLabel: string): string;
|
|
28
29
|
export interface PendingImage {
|
|
@@ -34,6 +35,8 @@ export interface AnalyzerContext {
|
|
|
34
35
|
screenshotCalls: number[];
|
|
35
36
|
config: unknown;
|
|
36
37
|
pendingImages: PendingImage[];
|
|
38
|
+
currentStage: string;
|
|
39
|
+
contractInjectedStage: string;
|
|
37
40
|
}
|
|
38
41
|
export declare function createAnalyzerContext(reportData: unknown, config?: unknown): AnalyzerContext;
|
|
39
42
|
export interface RootCauseResult {
|